rsa

Which attacks are possible concerning my security layer concept?

Despite all the advices to use SSL/https/etc. I decided to implement my own security layer on top of http for my application... The concept works as follows: User registers -> a new RSA Keypair is generated the Private Key gets encrypted with AES using the users login Password (which the server doesnt know - it has only the sha256 for a...

ssh connection using RSA key keep asking password

I'm trying to set-up SSH connections without password to many servers, using RSA key. It works well for most of them but one is giving me some trouble. The most common issue I've found in the past is permissions problems on .ssh or authorized_keys on the remote host, but here they seem correct, like this: drwx------ ~/.ssh -rw-r--r-- ...

Chilkat RSA Encrypt fails in Windows7/IIS7

I developed a simple ASP.NET website that uses Chilkatdotnet2 (version 9.0.8.0) to generate RSA Public/Private Key pair used for encryption. Below is the sample code bool success; string UnlockChilkatRSA = "XXXXXXXXXXXXXX"; int RSAKeyLength = 1024; Chilkat.Rsa rsa = new Chilkat.Rsa(); success = ...

openssl_pkey_get_public not open public key, "no start line" error

When generating public key and then reading it with function openssl_pkey_get_public - $publicKeyResource = bool(false) and message: error:0906D06C:PEM routines:PEM_read_bio:no start line $privateKey = openssl_pkey_new(array('private_key_bits' => 2048, 'private_key_type' => OPENSSL_KEYTYPE_RSA)); $keyDetails = openssl_pkey_get_details(...

How to specify public key in RSACryptoServiceProvider .NET class

Hello everybody. I need to sign an xml-doc with digital signature. I know that there is a way to do this in .NET but i cannot understand how to specify my own puplic key in RSACryptoServiceProvider. I need for the public key based on the special keyword. How can i do this? Help me please. ...

Android create RSA 1024 .NET compatible keys

I am developing an Android Application and I need to generate some RSA private and public keys to use for secure communication with web services. To do this I need to have the public key in a .NET compatible form. Like: <RSAKeyValue><Modulus>{0}</Modulus><Exponent>{1}</Exponent></RSAKeyValue> So far I managed to to this: keyGen =...

Formatting RSA keys for OpenSSL in Java

Background RSA key generation with OpenSSL on Linux using the command, openssl genrsa -out mykey.pem 1024 created the following: "-----BEGIN RSA PRIVATE KEY----- MIICXQIBAAKBgQChs9Fepy5FgeL0gNJ8GHcKRHsYnM2Kkw19zwydDQNyh2hrHWV2 B11wpLFp8d0imcl2Wjb0oV/AxOhb3unQgNzs66LVuXJwS8icp3oIJZtExs6tkxzE s5mnU68wMeCYtJqHIZOmNblVWvpJMLNAwAVi3o...

Integrate RSA SecurID authentication with a j2ee server?

I'm looking to integrate a J2EE app running on JBoss with RSA's Access Manager (which provides authentication with SecurID tokens). The documentation I've found so far is pretty sparse. RSA's site says there are " Java Runtime API and Admin API; Web Services Interfaces for runtime and admin" but I haven't found more details. Any pointe...

RSA and AES Decrypt and Encrypt problem

I have generated on my android application a pair of RSA Keys. I receive from a web service - an AES Key, encrypted with my RSA public key - a String encoded with the AES key. So I must do the following: - decrypt the AES Key - decrypt the string with the obtained AES Key. To generate the RSA Keys I did: keyGen = KeyPairGenerator.g...

Generate private RSA key in C#

Hi, I have the values for p, q, n and e and would like to calculate the private key d. How can I do this, could someone give me the example C# code? I am using a BigInteger class to represent the values for p, q, n and e so I assume d will be a BigInteger as well. Thanks, b3n ...

Ideas for Android Securty Project

Hello everyone, I am a student taking a course in Network security.As a part of my coursework I need to do a project on the security side of Android like developing a simple application which involves basic security concepts. I searched for different ideas which I can implement on Android within a span of 2-3 weeks.I found ideas such a...

Protecting connection strings during dev

We need to protect connection strings during development. On servers we use DPAPI which works fine. DPAPI is not an option during dev since the connection strings will need to be decrypted on many machines. Some of the user names/password used for dev are rather sensitive and we don't want them floating around. It's fine for all the ...

RSA decryption from .NET using PHP

Hello all, I am not sure where to post this so I am starting here and hoping for the best. I have a public and private key generated for .NET. The keys have (Modulus, Exponent, etc...). I sent the public key to a third party and they used it to encrypt passwords in a database. I downloaded the encrypted passwords and now I need to decr...

How to export a public key in OpenSSL/libcrypto?

Hi All, I've created an RSA key using: RSA_generate_key(2048, RSA_F4, NULL, NULL); Now I want to export the public key to another party B. Right now, I've just memcpy'd the entire RSA* struct and sent that over the wire, and B is able to use that to encrypt using RSA_public_encrypt(). But I think in this case I've actually exported t...

How do I access my SSH public key?

I am exactly halfway down this page: http://help.github.com/msysgit-key-setup/ I've just generated my first ever RSA keypair and I now want to add that key to my Github account. Thing is, I don't see how to access the public key that I'm supposed to enter into Github's 'key' field. Entering cd id_rsa.pub and id_rsa.pub into Git Bash do...

How to find out the modulus and exponent of RSA Public Key on iPhone/Objective C

Hi there! Is there a possible way to find out the modulus and exponent of the Public Key, created with SecKeyGeneratePair (the Security Framework in general)? ...

Using XEnroll to create a PKCS10 with SHA-256 Hash Algorithm

I am trying to create a SHA-256 PKCS10 using Microsoft´s CSP (Microsoft Enhanced RSA and AES Cryptographic Provider (Prototype)) but without success. I have to do this using the XEnroll API (Windows XP / SP3). Here´s the sample for generating a SHA-1 PKCS10 (works just fine!): Set Enroll=CreateObject("CEnroll.CEnroll.2") Enroll.provid...

OPENSSL and private key

Hello guys and gals! Openssl is a great security library and I use it from time to time. When I generate RSA keys I have RSA object with private and public key data. OK. Fine. I'm happy with that. I can print private key to the printer. And here come's the question. Is it possible to create a valid RSA object only from the entered pri...

RSA hex keys to PEM format

I have information about n,p,q where n=pq and p and q are large prime numbers to be used for the RSA algorithm. For example: n: C053094BFABF26D431CF33E028770DBB15F4AE76820B5150181F1BF42C5CF3AA7BDB459ACA77D610497F94FFA017BC07EF030E3D3450CAE7E706F352B7D7575CA6B89A5B3C953028E562F7F698C97FDD490EDF4788F073362C743B70AF2C61A17FA495E5801CC8EA1A...

RSA: java.lang.OutOfMemoryError

Hi folks, I am facing java.lang.OutOfMemoryError throwing from here : com.rsa.certj.cert.AttributeValueAssertion.clone Do you have any idea about that? ...