2020-04-15 21:35:12 +02:00
2020-04-18 11:29:01 +02:00
2020-04-18 15:27:38 +02:00
2020-04-15 21:34:36 +02:00
2020-04-14 17:15:01 +02:00
2020-04-14 17:15:34 +02:00
2020-04-14 17:15:34 +02:00
2020-04-15 17:42:10 +02:00
2020-04-16 12:51:55 +02:00
2020-04-16 12:51:55 +02:00

NativeCrypto

Fast crypto functions for Flutter.

Why 🤔

Because I faced a performance issue when I was using PointyCastle.

It's quite simple, judge for yourself, these are times for AES256 encryption on an Android device.

Size PointyCastle
100 kB 190 ms
200 kB 314 ms
300 kB 1138 ms
400 kB 2781 ms
500 kB 4691 ms
600 kB 7225 ms
700 kB 10264 ms
800 kB 13582 ms
900 kB 17607 ms

We notice that these times, in addition to being far too big, are not even linear.

Performances ⏱

Size NativeCrypto
1 mB 27 ms
2 mB 43 ms
3 mB 78 ms
4 mB 93 ms
5 mB 100 ms
10 mB 229 ms
50 mB 779 ms

How 🔬

Using the native implementation of the crypto libs available on each OS.

For Android:

For iOS:

Todo 🚀

  • Implement working cross platform AES encryption/decryption.
  • Different key sizes support.
  • Improve performances.
  • Add other ciphers.
  • ... add asym crypto support.
Description
Fast and powerful cryptographic functions for Flutter.
Readme 1.1 MiB
Languages
Dart 67.2%
Java 15%
Kotlin 8.2%
Swift 8.1%
Ruby 0.7%
Other 0.8%