v0.3.2
ed25519_edwards
Go Cryptography ed25519의 Dart 포트
13좋아요 74.2만30일 다운로드160Pub 점수
AndroidiOSWebmacOSWindowsLinux
Go Cryptography ed25519의 Dart 포트
아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
Dart port of ed25519 from Golang ed25519
import 'package:ed25519_edwards/ed25519_edwards.dart' as ed;
void signAndVerify() {
var keyPair = ed.generateKey();
var privateKey = keyPair.privateKey;
var publicKey = keyPair.publicKey;
var message = utf8.encode('test message');
var sig = ed.sign(privateKey, message as Uint8List);
var result = ed.verify(publicKey, message, sig);
assert(result == true);
var wrongMessage = utf8.encode('wrong message');
var wrongResult = ed.verify(publicKey, wrongMessage as Uint8List, sig);
assert(wrongResult == false);
}
| Ed25519 |
|---|
| public |
| seed |
| newKeyFromSeed |
| generateKey |
| sign |
| verify |
| Edwards25519 |
|---|
| FeZero |
| FeOne |
| FeAdd |
| FeSub |
| FeCopy |
| FeCMove |
| FeFromBytes |
| FeToBytes |
| FeIsNegative |
| FeIsNonZero |
| FeNeg |
| FeCombine |
| FeMul |
| FeSqaure |
| FeSquare2 |
| FeInvert |
| GeDoubleScalarMultVartime |
| PreComputedGroupElementCMove |
| GeScalarMultBase |
| ScMulAdd |
| ScReduce |
| ScMinimal |
Simulate from pinenacl-dart Benchmark
MacBook Pro (16-inch, 2019), macOS Big Sur, with 2.4GHz i9 32GB
dart test test/benchmark/ed25519_benchmark.dart
| type | rate | iterations | time | data throughput |
|---|---|---|---|---|
| Ed25519 - sign | 50.54 MB/s | 254 iterations | 5025 ms | 254.00 MB |
| Ed25519 - verify | 97.38 MB/s | 487 iterations | 5001 ms | 487.00 MB |
dart2native test/benchmark/ed25519_benchmark.dart -o ed25519_benchmark
./ed25519_benchmark
| type | rate | iterations | time | data throughput |
|---|---|---|---|---|
| Ed25519 - sign | 21.64 MB/s | 109 iterations | 5036 ms | 109.00 MB |
| Ed25519 - verify | 37.20 MB/s | 187 iterations | 5027 ms | 187.00 MB |
dart test test/benchmark/ed25519_benchmark.dart -p chrome
| type | rate | iterations | time | data throughput |
|---|---|---|---|---|
| Ed25519 - sign | 797.03 KB/s | 4 iterations | 5139 ms | 4.00 MB |
| Ed25519 - verify | 1.53 MB/s | 8 iterations | 5231 ms | 8.00 MB |
의존성 목록 8 개
^1.15.0^3.0.0^3.0.0^1.0.0^1.0.1^1.16.4^0.2.0^2.0.0사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗