Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

I'm trying to use a java implementation of ed25519.

In the code, I can't find any functions that generate keys.

My experience with cryptography is limited to about three weeks of asking questions on stack.

Does the code generate keys? If so, which function?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Ed25519 is a specific implementation of EdDSA using the Twisted Edwards curve:

x^2 + y^2 = 1 + (121665/121666) * (x^2)(y^2)

It's known as high speed high security signature algorithm. For using the code you pointed out, you need to feed sk, pk, m, sm.

So first you need to call publickey function with sk, then call signature function with m, sk and pk. PK is byte array returned from publickey function.

An example entry:

9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a:d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a::e5564300c360ac729086e2cc806e828a84877f1eb8e5d974d873e065224901555fb8821590a33bacc61e39701cf9b46bd25bf5f0595bbe24655141438e7a100b:

It's sk:pk:m:sm

You can find more info at: http://ed25519.cr.yp.to/index.html

share|improve this answer
    
Thank you so very much M. C.! I think I understand, but how is sk generated? Thank you so very much in advance! –  user7024 Jan 11 at 21:42
    
SK is signing key, there is a Python code here github.com/warner/python-ed25519/blob/master/src/ed25519/… which does have a function called create_keypair, that's how you create key pairs –  72DFBF5B A0DF5BE9 Jan 11 at 21:47
    
@Gracchus: Private signing keys can be generated from just the 32-byte seed, but require additional work before you can make signatures –  72DFBF5B A0DF5BE9 Jan 11 at 21:52
    

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.