Questions tagged [ed25519]

Ed25519 is a public-key signature system.

Ed25519 is a public-key signature system with several attractive features:

  • Fast single-signature verification. The software takes only 273364 cycles to verify a signature on Intel's widely deployed Nehalem/Westmere lines of CPUs. (This performance measurement is for short messages; for very long messages, verification time is dominated by hashing time.) Nehalem and Westmere include all Core i7, i5, and i3 CPUs released between 2008 and 2010, and most Xeon CPUs released in the same period.
  • Even faster batch verification. The software performs a batch of 64 separate signature verifications (verifying 64 signatures of 64 messages under 64 public keys) in only 8.55 million cycles, i.e., under 134000 cycles per signature. The software fits easily into L1 cache, so contention between cores is negligible: a quad-core 2.4GHz Westmere verifies 71000 signatures per second, while keeping the maximum verification latency below 4 milliseconds.
  • Very fast signing. The software takes only 87548 cycles to sign a message. A quad-core 2.4GHz Westmere signs 109000 messages per second.
  • Fast key generation. Key generation is almost as fast as signing. There is a slight penalty for key generation to obtain a secure random number from the operating system; /dev/urandom under Linux costs about 6000 cycles.
  • High security level. This system has a 2^128 security target; breaking it has similar difficulty to breaking NIST P-256, RSA with ~3000-bit keys, strong 128-bit block ciphers, etc. The best attacks known actually cost more than 2^140 bit operations on average, and degrade quadratically in success probability as the number of bit operations drops.
  • Foolproof session keys. Signatures are generated deterministically; key generation consumes new randomness but new signatures do not. This is not only a speed feature but also a security feature, directly relevant to the recent collapse of the Sony PlayStation 3 security system.
  • Collision resilience. Hash-function collisions do not break this system. This adds a layer of defense against the possibility of weakness in the selected hash function.
  • No secret array indices. The software never reads or writes data from secret addresses in RAM; the pattern of addresses is completely predictable. The software is therefore immune to cache-timing attacks, hyperthreading attacks, and other side-channel attacks that rely on leakage of addresses through the CPU cache.
  • No secret branch conditions. The software never performs conditional branches based on secret data; the pattern of jumps is completely predictable. The software is therefore immune to side-channel attacks that rely on leakage of information through the branch-prediction unit.
  • Small signatures. Signatures fit into 64 bytes. These signatures are actually compressed versions of longer signatures; the times for compression and decompression are included in the cycle counts reported above.
  • Small keys. Public keys consume only 32 bytes. The times for compression and decompression are again included.
128 questions
5
votes
1 answer

Sign and verify JWS (json web signature) with Ed25519 KeyPair

I want to sign a JWS (json web signature) with a private key generated through Ed25519 on a clients device. Then send this signature to my backend and verify it with the public key. To get familiar with the procedure I want to try to sign and verify…
JonasLevin
  • 1,592
  • 1
  • 20
  • 50
5
votes
1 answer

BIP44 with ed25519 curve signature

I want to use BIP44 HD wallet with Ed25519 curve. Does BIP 44 support the Ed25519 curve, Because I have read that BIP32 does not compatible with Ed25519 based cryptography.
5
votes
0 answers

difference between donna and supercop implementations for ed25519 signature scheme

While looking up the existing implementations of the ed25519 signature scheme I found out that the donna implementation (found here) produces signatures that are not verifiable by supercop implementation (found here), but supercop signatures are…
5
votes
2 answers

Convert Ed25519 to RSA fingerprint (or how to find SSH fingerprint)

BizTalk sees thumbprint for an internal SFTP test as ssh-rsa 2048 33:88:f0:ff:63:78:a9:2b:3f:09:cb:05:81:db:59:86 WinSCP shows: ssh-ed25519 256 ff:2e:5e:33:7a:15:de:69:18:cf:82:ae:f0:4e:7b:d2 (when I click "Session", then "Server/Protocol…
NealWalters
  • 17,197
  • 42
  • 141
  • 251
4
votes
1 answer

SSH key works if the file name is the default, but not when it's renamed

I wanted to generate an SSH key for my GitHub account. Following this guide, I ran ssh-keygen -t ed25519 -C "my@email.com". I gave it the filename github_main and put in a passphrase. All that worked fine. Running ssh-add ~/.ssh/github_main gave a…
Brent Meeusen
  • 179
  • 1
  • 11
4
votes
0 answers

pysftp paramiko.ssh_exception.SSHException: unpack requires a buffer of 4 bytes

I am using pysftp for the first time. I have seen this error before with struct and other libraries, but the problem with pysftp seems tricky. I can't connect to the server. I am sure I am missing something basic here, and so any ideas will be…
RforResearch
  • 401
  • 8
  • 16
4
votes
1 answer

ssh-keygen from Ed25519 OpenSSL pem private key

I would like to generate a public SSH key from an OpenSSL generated Ed25519 private key. I tried: ssh-keygen -t ed25519 -f ed25519_key -y > ed25519_ssh.pub And got the error: Load key "ed25519_key": invalid format
user1222324562
  • 965
  • 2
  • 9
  • 24
3
votes
0 answers

PEM file format for Ed25519 key pairs in Java

I'm trying to write and read a PEM file that contains both a PublicKey and PrivateKey for Ed25519 in Java 15. However it's not clear if the PEM format supports this, or exactly how to do it using the standard Java libraries (JCA). Most of the…
mikera
  • 105,238
  • 25
  • 256
  • 415
3
votes
1 answer

Get public key from private ED25519 Go

I am attempting to extract a public key from a private key using ED25519 with Go. I pass my private key byte value into my method, create a new ed25519 private key struct from it, and then use the .Public() method to retrieve the public key. pk :=…
N P
  • 2,319
  • 7
  • 32
  • 54
3
votes
0 answers

Signing a message in javascript and verifying signature on kotlin/java backend with ed25519 as our signature algorithm

I have the code below which I am using to sign some payload in javascript using ed25519 signature algorithm var nacl=require("tweetnacl") var keys=nacl.sign.keyPair() var TextEncoder= require('util').TextEncoder; var documentId =…
3
votes
1 answer

SSH to a server from nodejs with ed25519 key

I tried using the module ssh2 by mscdex which, but it doesn't support the key ed25519. var Connection = require('ssh2'); var c = new Connection(); c.connect({ host: host, port: port, username: user, privateKey:…
bobo
  • 31
  • 4
2
votes
0 answers

How can I generate an ed25519 key pair in OpenSSH format with swift?

I tried to generate the keys with different approaches, get the raw data but I can't find any library that transform these bytes into OpenSSH compatible public and private keys. Approach 1: let privateKeyParams: [String: Any] = [ …
Ettore Gallina
  • 435
  • 1
  • 3
  • 16
2
votes
1 answer

Sign a text with pynacl (Ed25519) importing a private key

In the code below I try to sign a nonce using pynacl. from nacl.encoding import Base64Encoder from nacl.signing import SigningKey import base58 import base64 secret = '5N3SxG4UzVDpNe4LyDoZyb6bSgE9tk3pE2XP5znXo5bF' nonce =…
2
votes
1 answer

Get public and private key from PEM ed25519 in C#

I have private key generated by: openssl genpkey -algorithm ed25519 -out private.pem and it looks like this: -----BEGIN PRIVATE KEY----- MC4CAQAwBQYDK2VwBCIEINTZWUEn/Jt6TV9OxGxjD+6CtqKB3MtcJdFAzFUg3fk/ -----END PRIVATE KEY----- I also have a public…
Szyszka947
  • 473
  • 2
  • 5
  • 21
2
votes
1 answer

Crypto.sign() function to sign a message with given private key

I need to sign a message with crypto.sign() function in NodeJS to get a valid JWT. I have a private key (base 64) like this: Dm2xriMD6riJagld4WCA6zWqtuWh40UzT/ZKO0pZgtHATOt0pGw90jG8BQHCE3EOjiCkFR2/gaW6JWi+3nZp8A== And I tried to get a…
1
2
3
8 9