Questions tagged [rsa]

RSA is a common public key algorithm, which can be used for encryption and signature. It is a core component of most the security protocols used on the Internet, including the SSL/TLS protocol suite. For questions about IBM Rational Software Architect, use the rational-rsa tag.

RSA is a public key cryptography algorithm. It is used in many Internet protocols that use cryptography, including /-based protocols (, etc.), , , and more. The name RSA comes from its inventors: Rivest, Shamir and Adleman.

RSA Security, Inc. is also the name of a security firm. Among other things, RSA publishes a series of standards related to public-key cryptography known as PKCS. The standard defines RSA.

RSA can be used for both encryption and signature. It is an asymmetric algorithm. A public key consists of two numbers: the modulus n, which is a large integer and determines the key size (1024 bits, 2048 bits and 4096 bits are common key sizes), and the public exponent e, which can be any odd integer between 3 and n but is often 3 or 65537. A private key consists of n and the private exponent d, which is generally almost as large as n. A private key may contain other fields to speed up computations.

The raw RSA operation is a mathematically simple operation: exponentiation modulo n. The exponent is the private exponent for encryption and signature, and the public exponent for decryption and verification. Only numbers up to n can be encrypted or signed. Therefore, instead of encrypting a whole message for RSA, one usually generates a session key (a symmetric key, for example an key) and encrypts this key with RSA. Instead of signing a message with RSA, one usually generates a cryptographic digest of the message (, , , …) and signs this digest.

The raw RSA operation is not secure. RSA requires a padding scheme. Common padding scheme include OAEP for encryption and PSS for signing, as well as other algorithms defined by .

For IBM Rational Software Architect, use .

6847 questions
2
votes
1 answer

OpenPGP encryption in pure PHP

I would like on your website, create a form that sends me a message encrypted in accordance with the OpenPGP standard in order to decrypt them by Thunderbird & Enigmail. Will include an order from an online shop. I can not use GnuPG, because my…
2
votes
1 answer

Converting Byte[] to String to Byte[] - RSA Encryption C#

If I give the decrypter RSAalg2.Decrypt(encryptedData, false); it works fine but I need to convert the encrypted data (byte array) to a string then back to a byte array. I've tried ASCIIEncoding, UTF-8 rather than Unicode with no luck. I'd…
user1043943
  • 23
  • 1
  • 1
  • 4
2
votes
1 answer

Problems with passing a public key to a client and then decrypting crypted information(RSA) (javax.crypto.BadPaddingException)

This is my first question here, so I hope that I am providing enough information to be able to get some kind of resolution to this (smallish?) problem I'm having with a (IMO) very basic public key crypting/decrypting problem. I've tried to follow…
Kapu
  • 39
  • 6
2
votes
1 answer

OSStatus -9809 while decryption

I am trying to implement an rsa encryption and decryption algorithm as a part of my app in iphone.(xcode 4.2,ios sdk 5.0) I am generating keys using SecKeyGeneratePair and encrypting using SecKeyEncrypt. Both these return OSStatus 0. But while…
ss kurup
  • 149
  • 2
  • 6
2
votes
2 answers

Convert rsa keys into pem format

I have an RSA keypair in decimal format like this: N: …
Fredefl
  • 1,391
  • 2
  • 17
  • 33
2
votes
0 answers

PHP, MySQL and RSA encryption

I have written a piece of code which, for testing purposes, only encrypts and then decrypts some text. I used phpseclib and it works well. When I store encrypted text in a mysql database, and then retrieve it from there and try to decrypt it, I get…
Marko Lekić
  • 123
  • 1
  • 7
2
votes
1 answer

Java RSA/CBC encryption implementation

Help, anybody could give me a Java implementation of RSA/CBC? Audit said RSA/ECB/PKCS1Padding is too weak cannot put into law court. (Is he challenging Java PKI in fact? He suggested AES...) I know nothing about Bouncy Castle, tell me if I can plug…
Calvin Lee
  • 97
  • 1
  • 7
2
votes
1 answer

Generate RSA coded string from Excel 2007

I need to generate RSA encoded string from Excel 2007 document using VBA, but have no idea how to do this(I have public key, string will be decoded in .NET). Please help. Thanks
drizzt
  • 2,756
  • 6
  • 27
  • 41
2
votes
1 answer

Using Bouncy Castle RSA Java

I need help using Bouncy Castle RSA Libraries for a school assignment, but it looks very complicated and I'm trying to learn and need some guidance. For my assignment I need to just generate a public and private key. Then encrypt a block of message…
kal
  • 305
  • 6
  • 12
2
votes
2 answers

Is RSA-encoded data exchangable

Up to now, I thought that if I have RSA-encrypted data, this data would be easily exchangable between most platforms (.net, java, pc, unix..), because of the commonly used algorithm. Through investigating for another questions I had, I'm now…
HCL
  • 36,053
  • 27
  • 163
  • 213
2
votes
3 answers

RSA Encrypt/Decrypt in Java

I am new to Cryptography. I was provided with a RSA public key in base64 format. Is there any way to encrypt some text using just the public key. Do I need modulus/exponent too? Any pointers would be very helpful. Thanks
AbbIbb
  • 41
  • 1
  • 4
2
votes
1 answer

RSA encryption and decryption in MVC3

Please help me in the following issue. RSAEncryptionAndDecryption rsaEncDec = new RSAEncryptionAndDecryption(document.PublicKey, document.PublicAndPrivateKey); string reportContent = rsaEncDec.Decrypt(document.Report).OriginalData; When i…
2
votes
0 answers

decrypting file from eToken

I am new to cryptography, hence I want to ask about my company's requirements. We are using eToken with RSA support. I have developed a code that encrypt file with public key and stored it in another file. Now I want to pass the encrypted file to…
Pravin
  • 195
  • 1
  • 4
  • 15
2
votes
2 answers

Construct Public Key from Big Integers?

I would like construct a public key which is constructed using C# XML RSAKeys, however I would like to reconstruct it using java, The problem is I receive the M & E themselves from the Key as bytes values, and to construct the key I've to use two…
andre_lamothe
  • 2,171
  • 2
  • 41
  • 74
2
votes
2 answers

Calculate x5t#s256 thumbprint of a public certificate present in postgres database using pgcrypto library

I'm working on a module where I'm evaluating method to add thumbprint (x5t#256) value to all public keys present in the DB. Conversion using javascript libraries, java libraries is doable. however trying to convert the same using pgcrypto doesn't…
1 2 3
99
100