Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: ecc_encrypt $message clear text is limited in length

by hippo (Canon)
on Feb 09, 2018 at 09:36 UTC ( #1208793=note: print w/replies, xml ) Need Help??

in reply to ecc_encrypt $message clear text is limited in length

I've not yet attempted to diagnose what you've done fully but I believe I can answer one question you posed:

my $ct = $pk->ecc_encrypt($message,'SHA256'); #Why do I have to specifify a hash function?

The documentation for ecc_encrypt says "ECCDH Encryption is performed by producing a random key, hashing it, and XOR'ing the digest against the plaintext", so that is where the hash algorithm comes in. Note that the documentation also says that ecc_encrypt() is a function as opposed to a method but a perusal of the source suggests that it can be called either way. HTH.

Replies are listed 'Best First'.
Re^2: ecc_encrypt $message clear text is limited in length
by JalapenoBob (Initiate) on Feb 09, 2018 at 22:17 UTC
    @hippo, thanks... that clears things up a lot. I had not seen that in the documentation and it makes perfect sense now.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1208793]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2018-08-15 16:25 GMT
Find Nodes?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:

    Results (161 votes). Check out past polls.