您当前的位置: 首页 > 

mutourend

暂无认证

  • 0浏览

    0关注

    661博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

Ed25519公钥签名系统——椭圆曲线签名

mutourend 发布时间:2019-07-02 11:09:18 ,浏览量:0

1. Ed25519 椭圆曲线公钥签名特性

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 2128 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 2140 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.

The numbers 87548 and 273364 shown above are official eBATS reports for a Westmere CPU (Intel Xeon E5620, hydra2). Ed25519 signatures are elliptic-curve signatures, carefully engineered at several levels of design and implementation to achieve very high speeds without compromising security.

2. Ed25519算法实现

crypto_sign/ed25519中,主要有以下三种算法实现,系统会自动选择最快的算法执行。 The Ed25519 software consists of three separate implementations, all providing the same interface:

  • amd64-51-30k. Assembly-language implementation for the amd64 architecture, using radix 251 and a 30KB precomputed table.
  • amd64-64-24k. Assembly-language implementation for the amd64 architecture, using radix 2^64 and a 24KB precomputed table.
  • ref. Slow but relatively simple and portable C implementation.Both SUPERCOP and NaCl automatically select the fastest implementation on each computer.
3. Ed25519主要参数

较为直观的python实现见:http://ed25519.cr.yp.to/python/ed25519.py 具体论文见:http://ed25519.cr.yp.to/ed25519-20110926.pdf

其中主要参数有: b = 256 q = 2255 - 19 l = 2252 + 27742317777372353535851937790883648493 d = −121665/121666

参考资料: [1] http://ed25519.cr.yp.to/ [2] http://ed25519.cr.yp.to/software.html [3] https://github.com/floodyberry/supercop/tree/master/crypto_sign/ed25519

关注
打赏
1664532908
查看更多评论
立即登录/注册

微信扫码登录

0.0379s