rsa

what is the format of RSA public key modulus and exponent in .net?

in a short question: How can I fill in RSAParameters if I have having the following input from the third party?: Modulus: 123456 Exponet: 111 In a long story, I use the following code: RSACryptoServiceProvider RSAalg = new RSACryptoServiceProvider(2048); RSAParameters rsaPublic = RSAalg.ExportParameters(false); then I can get...

What causes "Neither PUB key nor PRIV key:: nested asn1 error" when building a public key in ruby?

When building a public key using the OpenSSL::PKey::RSA module by passing it a .pem file, what is the cause for a response: OpenSSL::PKey::RSAError: Neither PUB key nor PRIV key:: nested asn1 error from /Users/Matt/projects/placepop/lib/apn.rb:48:in `initialize' from /Users/Matt/projects/placepop/lib/apn.rb:48:in `new' from /Users/Matt/...

Can one encrypt with a private key/decrypt with a public key?

[Disclaimer: I know, if you know anything about crypto you're probably about to tell me why I'm doing it wrong - I've done enough Googling to know this seems to be the typical response.] Suppose the following: you have a central authority that wants to issue login cookies for a given domain. On this domain, you don't necessarily trust ...

using public/private keys in javascript

Hi, I need to send an ajax POST request to my server. I'll need to make sure that the request originated from the script itself, and not from a user writing the request him/her self. Is there any secure way to do this? Can the script sign or encode the POST request, later to be decrypted by the server's private key? and can I somehow p...

Why RSA Decryption process takes longer time than the Encryption process?

I have some idea that it is due to some complex calculation, but i want to know about what exactly happens which takes long time than the corresponding encryption process. Any link to webpage or paper would be of great help. Thanks Thanks for the answers, One more Doubt, What about the Signing and verification? Will this time differenc...

IPhone/Objective-c RSA encryption

Hello, I have been google-ing and researching for an answer on how to do a simple RSA encryption using objective-c on an iphone. The main problem i have is that i have been supplied the Exponent and Modulus as an NSData object and i need to then convert them to a SecKeyRef object in order to perform the RSA encryption. Does anyone have...

Signing a string with RSA private key on Google App Engine Python SDK

Is there any known way to sign a plain text string with RSA private key on Google App Engine Python SDK? ...

Is it possible sign a plain text string with RSA private key on Google App Engine with Java SDK?

Hi, Is it possible sign a plain text string with RSA private key on Google App Engine with Java SDK? Thanks ...

How to recover a RSA public key from a byte[] array?

Hello, I'm wondering if it's possible to recover a RSA public key that I have converted to byte array previously. byte[] keyBytes = publicKey.getEncoded(); Thanks for the help. ...

RSA Encryption on iPhone

According the discussion on http://forums.macrumors.com/showthread.php?t=551476 the code seen below would do for RSA encryption. The datatype of the key ("public") is SecKeyRef. I will not be using the keychain, though, as I'm only interested in encryption where the key is public and is no secret. Is it even possible to use the crypto AP...

How can I know if a file has been changed in .NET C#?

I have an application that requires a secure way to store its configuration. There are users that can change the configuration. I need some sort of signature scheme where I can verify that the config file has not changed with out a valid user. I had thought about using RSA, where the private key is encrypted with the users password, and ...

RSA Encrypt / Decrypt Problem in .NET

I'm having a problem with C# encrypting and decrypting using RSA. I have developed a web service that will be sent sensitive financial information and transactions. What I would like to be able to do is on the client side, Encrypt the certain fields using the clients RSA Private key, once it has reached my service it will decrypt with th...

How to load an RSA key from binary data to an RSA structure using the OpenSSL C Library?

Currently I have my private key saved in a file, private.key, and I use the following function to load it: RSA *r = PEM_read_RSAPrivateKey("private.key", NULL, NULL, NULL); This works perfectly but I'm not happy with the file-based format; I want to save my key in pure binary form (ie, no base64 or similar) in a char* variable and load...

Encrypting using RSA via COM Interop = "The requested operation requires delegation to be enabled on the machine."

Hi Guys, So i've got this little static method in a .Net class which takes a string, uses some stored public key and returns the encrypted version of that key. This is basically so some user entered data can be saved an encrypted, then retrieved and decrypted at a later date. Pretty basic stuff and the unit test works fine. However, ...

How do I verify a DKIM signature in PHP?

I'll admit I'm not very adept at key verification. What I have is a script that downloads messages from a POP3 server, and I'm attempting to verify the DKIM signatures in PHP. I've already figured out the body hash (bh) validation check, but I can't figure out the header validation. http://www.dkim.org/specs/rfc4871-dkimbase.html#rfc.se...

RSA Public key created in C# is not saved in iPhone keychain

Hello. I'm trying to send RSA public key from C# server to iPhone, so I could encrypt info on iPhone and decrypt it in C# server. But when I save received public key in iPhone, it's not saved. I create key in C# like this: RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(1024); byte [] body = rsa.exportCspBlob(false); ...

BN_hex2bn magically segfaults in openSSL

Greetings, this is my first post on stackoverflow, and i'm sorry if its a bit long. I'm trying to build a handshake protocol for my own project and am having issues with the server converting the clients RSA's public key to a Bignum. It works in my clent code, but the server segfaults when attempting to convert the hex value of the clie...

Git and ssh authorizating

Hello, I can't login to github with generated ssh-keys. I've followed this manual: http://help.github.com/linux-key-setup but at step: ssh [email protected] I get: Agent admitted failure to sign using the key. Permission denied (publickey). What's wroing? And, of course, I'm adding my own user email. Tried dsa-key, the s...

Securing a license key with RSA key.

Hello, it's late, I'm tired, and probably being quite dense.... I have written an application that I need to secure so it will only run on machines that I generate a key for. What I am doing for now is getting the BIOS serial number and generating a hash from that, I then am encrypting it using a XML RSA private key. I then sign the XML...

blackberry smartcard reader example

I am writing an app for BlackBerry that utilizes a BlackBerry smartcard reader. There is not much documentation on the subject, so I'd really like if someone could give me starting examples. Basically, there is one RSA private key on the card plus a certificate (for paired public key). I would like to be able to encrypt/decrypt data and...