[PATCH] Add Ed25519 keys support

Vladislav Grishenko themiron.ru at gmail.com
Fri Mar 6 22:45:28 AWST 2020


Hello,

 

Initially inspired by Péter Szabó work from 2017, but made with general approach:

 

·        Curve25519/Ed25519 implementation based on TweetNaCl version 20140427, old Google's curve25519_donna dropped as unnecessary, saves a lot of size.

·        SHA512 reused from LibTomCrypt, no need to keep own copy

·        Sign/Verify require no additional memory allocation

·        Dropbear's API made ~similar to LibTomCrypt devel to ease possible switch, if necessary. Anyway, LibTomCrypt is based on TweetNaCl as well.

·        Default private key path is key/etc/dropbear/dropbear_ed25519_host_key

·        Implemented general import from / export to OpenSSH private keys, can be reused for other key types on necessary

·        Implemented *25519 fuzzers, but still need corresponding data from dropbear-fuzzcorpus 

·        Man, license, commens updated to fit Ed25519

 

So far, DROPBEAR_CURVE25519 increases dropbear binary by ~2,5Kb on X86-64 vs ~8Kb of current curve25519_donna implementation.

DROPBEAR_ED25519 adds ~7,5Kb to dropbear and ~1kB to dropbearconvert for OpenSSH import/export.

 

Related PR against current sources is here  <https://github.com/mkj/dropbear/pull/91> https://github.com/mkj/dropbear/pull/91, patches are attached.

Review and/or any suggestios will be highly appreciated.

 

Thank you and

Best Regards, Vladislav Grishenko



-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ucc.gu.uwa.edu.au/pipermail/dropbear/attachments/20200306/383c92d2/attachment-0001.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-support-for-Ed25519-as-a-public-key-type.patch
Type: application/octet-stream
Size: 79914 bytes
Desc: not available
Url : https://lists.ucc.gu.uwa.edu.au/pipermail/dropbear/attachments/20200306/383c92d2/attachment-0003.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Add-curve25519-and-ed25519-fuzzers.patch
Type: application/octet-stream
Size: 6353 bytes
Desc: not available
Url : https://lists.ucc.gu.uwa.edu.au/pipermail/dropbear/attachments/20200306/383c92d2/attachment-0004.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Add-import-and-export-of-Ed25519-keys.patch
Type: application/octet-stream
Size: 7066 bytes
Desc: not available
Url : https://lists.ucc.gu.uwa.edu.au/pipermail/dropbear/attachments/20200306/383c92d2/attachment-0005.obj 


More information about the Dropbear mailing list