MixinNetwork / libsignal_protocol_dart

Signal Protocol library for Dart/Flutter
https://pub.dev/packages/libsignal_protocol_dart
GNU General Public License v3.0
157 stars 42 forks source link

Benchmark encrypt and decrypt #40

Open crossle opened 3 years ago

crossle commented 3 years ago

Before we use golang library for ed25519, and dart ffi call it, but not good for multiple platform support. Now we use pure dart encrypt and decrypt ed25519, should we compare with use rust implements the ed25519 with dart ffi?

crossle commented 3 years ago

https://github.com/ilap/pinenacl-dart

Tougee commented 3 years ago

Add benchmark for ed25519 https://github.com/Tougee/ed25519#Benchmark

Tougee commented 3 years ago

Pure Dart benchmark branch FFI benchmark branch

type rate iterations time data throughput
Pure Dart JIT sign 55.08 MB/s 276 iterations 5010 ms 276.00 MB
Pure Dart JIT verify 108.39 MB/s 542 iterations 5000 ms 542.00 MB
Pure Dart AOT sign 22.59 MB/s 113 iterations 5001 ms 113.00 MB
Pure Dart AOT verify 45.86 MB/s 230 iterations 5015 ms 230.00 MB
FFI JIT sign 24.19 MB/s 121 iterations 5003 ms 121.00 MB
FFI JIT verify 25.04 MB/s 126 iterations 5032 ms 126.00 MB
FFI AOT sign 26.98 MB/s 135 iterations 5004 ms 135.00 MB
FFI AOT verify 26.83 MB/s 135 iterations 5031 ms 135.00 MB
crossle commented 2 years ago

How about the new Ed25519 version? @Tougee

crossle commented 8 months ago

https://github.com/google/webcrypto.dart