Closed deepakinseattle closed 14 years ago
Thanks for the report!
This is quite normal, as you use a RSA key. The maximum encryption size you may use depends on the size of the key (see PKCS#1). 84 byte is for a 768 bit RSA key. 116 byte seems to be on a 1024 bit key. The test nss database that comes with the gem, stores a 768 bit key, which is used in test_endecrypt().
You may use a symmetric (DES or AES) algorithm or a hybrid (RSA for a session key and AES for the message) to encrypt longer messages.
Of course, Lars! I had completely spaced on that. Thanks for the clarification.
Also, I've noticed a number of commits from you recently, when do you think you'll be releasing a newer version of the gem?
Thanks!
So far, the library is already in a good shape, I think. What I want to finish before 0.2 is a complete yard-documentation of all structs, methods and constants. Althought I use the library in commercial projects, most of the work is done in my spare time. So there is no fixed plan. I guess in 1 or 2 months.
Is there something you're awaiting in particular?
Hello, I'm just getting started using your gem (thanks, btw!). I was trying out a few things, but unfortunately I'm running into an error, one I can reproduce pretty easily by adding to the existing TestPkcs11Crypt class. When attempting to encrypt text greater than a certain length, encryption fails with :
This is based on a recent git clone of master. I encounter the same error using the published version of the gem, but interestingly, the length of text that triggers a failure is different between the two. Using the latest code from master, the failure begins to happen when the text length is greater than 84. Using the gem, the failure begins to happen when the text length is greater than 116. Odd, right?
System Information :
Let me know if you have any additional questions/clarifications.
Thanks!