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
1
vote
1 answer

PASETO token signature is not valid but the private and public key match

I'm using https://www.nuget.org/packages/Paseto.Core/ and this is how I generate the PASETO token: public async Task GenerateAsync(Client client, TokenRequest tokenRequest, string issuer, string audience) { var…
Szyszka947
  • 473
  • 2
  • 5
  • 21
1
vote
1 answer

How can I get the RSA fingerprint for GitHub instead of their ED25519 key fingerprint?

I want to add GitHub to my computer's list of acceptable SSH hosts for a coding boot camp that I will be taking soon. The boot camp says that I need to do so via GitHub's RSA public key fingerprint. However, I keep getting GitHub's ED25519 public…
Alyssa
  • 11
  • 2
  • 2
1
vote
1 answer

Extra `=` padding in ed25519 fingerprint in AWS EC2 key

I'm encountering an interesting scenario where the generated fingerprint for my imported/created ed25519 SSH key is different from the one reported by ssh-keygen in the AWS EC2 Key console. For example, consider a random key I generated for which…
Hannibal
  • 1,078
  • 2
  • 12
  • 24
1
vote
1 answer

Python Crypto Module - ValueError: An Ed25519 private key is 32 bytes long

I am using a GO Language script to generate private and public keys. This algorithm uses Ed25519. When I am reading the private keys using python crypto module I am receiving following error. >>> import…
sam
  • 1,819
  • 1
  • 18
  • 30
1
vote
1 answer

Generating and validating a signature with ED25519 expanded private key

I am building a encrypted messaging app over tor network and currently I'm struggling on using tor generated ed25519 private key to sign and verify any message. Below piece of code works with a 32 bytes key however after skipping 32 header bytes of…
1
vote
0 answers

How to export ed25519 public key from []*pkcs11.Attribute

I generated an ed25519 key pair with golang PKCS11 library branch v3 (it is connected to SoftHSM2): publicKeyTemplate := []*pkcs11.Attribute{ pkcs11.NewAttribute(pkcs11.CKA_CLASS, pkcs11.CKO_PUBLIC_KEY), …
1
vote
1 answer

GitHub.com SSH access fails

I'm failing to access GitHub.com via SSH (for pushing with GitHub desktop). My client is a Windows 10 system. It used to work until yesterday. I had some problems and then I decided to reinitialize the SSH environment. I deleted the public key on…
Ulrich
  • 715
  • 2
  • 7
  • 25
1
vote
1 answer

Generate JWS (json web signature) with Ed25519 algo in Dart

I want to sign a json web signature with a privateKey generated through Ed25519. Then send this signature to my backend and verify it with the public key in Node.js. Currently im stuck at creating a json web signature with Dart. The privateKey is…
JonasLevin
  • 1,592
  • 1
  • 20
  • 50
1
vote
1 answer

Lazysodium keys in Java Keystore

I'm using the Lazysodium library (https://terl.gitbook.io/lazysodium/) to access libsodium from Java, specifically for Ed25519 digital signatures. I'd also like to be able to store key pairs in a standard Java keystore. However, libsodium works with…
mikera
  • 105,238
  • 25
  • 256
  • 415
1
vote
0 answers

Storing Ed25519 Private key on Android

I am working on a java sdk which will be used for encryption/decryption of different data/messages and much more. It uses BouncyCastle v1.68 library, as well as Ed25519 algorithm for signing. One of the requirements is to store Ed25519 private key.…
user777
  • 83
  • 7
1
vote
1 answer

How to create an OpenSSH compatible ED25519 key with Bouncy Castle?

How can you create an OpenSSH ED25519 private key that can be used for SSH? The goal would be to have a key file in the same format same like you would have in .ssh/id_ed25519 for your OpenSSH client. This is my current approach, which does not…
mwarning
  • 721
  • 5
  • 22
1
vote
1 answer

raise ValueError("Invalid DER input: insufficient data") ValueError: Invalid DER input: insufficient data. How to solve this Error

I am trying to use ED25519 signing and verifying blockchain transactions in my blockchain project but I am getting a ValueError "Invalid DER input: insufficient data when I add the encode_dss_signature, and decode_dss_signature. I am first…
1
vote
1 answer

Decrypting Ed25519 private keys using python libraries without ssh-keygen -p

I have private key, example generate RSA key pair: ssh-keygen -t rsa -N 123456 -f /tmp/rsa I can replace the call: ssh-keygen -p -P 123456 -N "" -f /tmp/rsa using python cryptography module: from cryptography.hazmat.backends import…
v1cont
  • 31
  • 4
1
vote
1 answer

Is there a simple way to convert a NodeJS KeyObject to a Buffer?

I am using NodeJS to generate Ed25519 keypairs. I need to convert the public key to a custom character encoding. However, there seems to be no way to convert the KeyObjects returned by the crypto.generateKeyPair() to buffers. Does the standard…
adrian
  • 1,439
  • 1
  • 15
  • 23
1
vote
0 answers

Python implementation of ed25519 shared secret agreement

Let's consider the following example. Using Python library tinyec I can write the following code: def compress(pubKey): return hex(pubKey.x) + hex(pubKey.y % 2)[2:] curve = registry.get_curve('brainpoolP256r1') alicePrivKey =…
docdev
  • 943
  • 1
  • 7
  • 17
1 2 3
8 9