No title

Anonymous Coward 2018-03-08 08:49:14.677089 UTC

1import Crypto.PubKey.ECIES
2import Crypto.ECC
3import Crypto.Error
4import Crypto.PubKey.Ed25519
5import Data.Proxy
6import Data.ByteString.Char8
7
8
9curve = Proxy :: Proxy Curve_Edwards25519
10
11randomString = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
12
13randomSeed = Data.ByteString.Char8.pack randomString
14
15
16receiversSK = Crypto.PubKey.Ed25519.secretKey randomSeed
17receiversPK = Crypto.PubKey.Ed25519.toPublic (throwCryptoError receiversSK)
18
19
20deriveEncrypt curve receiversPK