|Do you know where your variables are?|
ECC.pm ecc_encrypt $message clear text is limited in lengthby JalapenoBob (Initiate)
|on Feb 08, 2018 at 00:02 UTC||Need Help??|
JalapenoBob has asked for the
wisdom of the Perl Monks concerning the following question:
Hello. Exploring ECC.pm. I must be missing something really simple. Happen to be on Windows 10. Interested in ECDH in Perl5. Use case is to leverage an elliptical public private key method to sign then encrypt a string of text. At the moment, focusing on encrypting the string. The string of text to encrypt may be up to 5000 characters but could be much longer. Question: When using ecc_encrypt the clear text appears to be limited to 20 bytes (20 characters) (SHA1) or 32 characters (SHA256) for $message. Now, there is no surprise on known hash length output. BTW I will not be using SHA1… just trying to figure this problem out. But, the surprise is that a hash function is used at (i.e. SHA1 or SHA256) all in the implementation of ECC based encryption.
Note: You'll notice that I have not included the signing part… just the encryption part.
How I am generating keys
How I am attempting to encrypt and then decrypt a string.
So, if I add one more character to $message then I get an error
Within ecc.pm line 574 specifies (by default) SHA1. And, this is where I am confused because I am hoping to not use a hash function but elliptic curve cryptography.
Now if I keep the message size to say 32 characters then no problem at all. So, any ideas?