# Performance test of react-native-quick-crypto

**URL:** <https://discourse.joplinapp.org/t/performance-test-of-react-native-quick-crypto/38622>\
**Category:** Native Encryption\
**Created:** [16 June 2024 18:40 UTC](https://discourse.joplinapp.org/t/performance-test-of-react-native-quick-crypto/38622 "2024-06-16T18:40:56Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![wh201906](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/wh201906/32/14835_2.png) [@wh201906](https://discourse.joplinapp.org/u/wh201906)\
**Post date:** [16 June 2024 18:40 UTC](https://discourse.joplinapp.org/t/performance-test-of-react-native-quick-crypto/38622/1 "2024-06-16T18:40:56Z")

</div>

When performing encryption/decryption, there are 3 stages which could impact performance:

- PBKDF2 Key Derivation
- AES Encryption/Decryption
- Base64 Encoding/Decoding

I measured the performance of these stages and here are the results.

## PBKDF2 Performance

 ![pbkdf2_rn](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/3X/8/c/8c89c5fab0d2c95e23c2d4e0430eb3f59862c0e8.svg)

(`quick` = `react-native-quick-crypto`. The three parameters on the X-axis are salt length (bits), password length (bits), and key iteration count. The Y-axis is logarithmic.)

Conclusions:

1. The length of salt and password doesn't significantly affect performance.
2. Time increases linearly with the key iteration count for `sjcl`.
3. For `react-native-quick-crypto`, performance improves with higher key iteration counts.
4. We achieved at least 100X performance improvement by switching to `react-native-quick-crypto`, and in some cases up to 340X.

## AES Encryption/Decryption Performance

 ![aes_rn](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/3X/1/7/1749475e51e7c517be97f8b79cc712fd17688d5c.svg)

(`quick` = `react-native-quick-crypto`. The two parameters on the X-axis are plaintext size (bytes) and key size (bits). The Y-axis is logarithmic.)

Conclusions:

1. Performance improves with larger plaintext sizes.
2. AES-256 is faster than AES-128 for `react-native-quick-crypto`.
3. AES-128 is faster than AES-256 for `sjcl`, though the difference is not significant. This aligns with the [test result here](https://github.com/laurent22/joplin/issues/8619#issuecomment-1671734375), but it doesn't explain why we get significant performance drop after [switching from AES-128 to AES-256](https://github.com/laurent22/joplin/issues/8657)
4. We achieved at least 20X performance improvement in AES encryption/decryption, and in some cases up to 300X to 5000X with larger plaintext sizes.

## Base64 Encoding/Decoding Performance

 ![base64_rn](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/3X/d/1/d159ddb6a146606601a99a823f42d8d8782a3f45.svg)

(`rnqc` = `react-native-quick-crypto`, `rnqb` = `react-native-quick-base64`. The Y-axis is linear.)

Conclusions:

1. Base64 decoding performance of `react-native-quick-crypto` is slower compared with the implementation in `sjcl`.
2. Switching to `react-native-quick-crypto` or `react-native-quick-base64` provides less than a 2X speed improvement.

# Tables

> **PBKDF2 Performance (Android device API 27)**
>
> (`quick` = `react-native-quick-crypto`)
> 
> | Case ID | Library | Salt Length (bits) | Password Length (bits) | Key Iteration Count | Key Size (bits) | Digest Function | Time (ms) |
> | --- | --- | --- | --- | --- | --- | --- | --- |
> | 1 | sjcl | 256 | 80 | 101 | 256 | SHA-256 | 11143/200 = 55.715 |
> | 2 | quick | 256 | 80 | 101 | 256 | SHA-256 | 4021/20000 = 0.20105 |
> | 3 | quick | 256 | 80 | 101 | 256 | SHA-512 | 6319/20000 = 0.31595 |
> | 4 | sjcl | 256 | 80 | 101 | 512 | SHA-256 | 22134/200 = 110.67 |
> | 5 | quick | 256 | 80 | 101 | 512 | SHA-512 | 6335/20000 = 0.31675 |
> | 6 | sjcl | 256 | 240 | 101 | 256 | SHA-256 | 11130/200 = 55.65 |
> | 7 | quick | 256 | 240 | 101 | 256 | SHA-256 | 5846/20000 = 0.2923 |
> | 8 | quick | 256 | 240 | 101 | 256 | SHA-512 | 8141/20000 = 0.40705 |
> | 9 | sjcl | 256 | 240 | 101 | 512 | SHA-256 | 22097/200 = 110.485 |
> | 10 | quick | 256 | 240 | 101 | 512 | SHA-512 | 8132/20000 = 0.4066 |
> | 11 | sjcl | 512 | 240 | 101 | 256 | SHA-256 | 11132/200 = 55.66 |
> | 12 | quick | 512 | 240 | 101 | 256 | SHA-256 | 5829/20000 = 0.29145 |
> | 13 | quick | 512 | 240 | 101 | 256 | SHA-512 | 8141/20000 = 0.40705 |
> | 14 | sjcl | 512 | 240 | 101 | 512 | SHA-256 | 22152/200 = 110.76 |
> | 15 | quick | 512 | 240 | 101 | 512 | SHA-512 | 8140/20000 = 0.407 |
> | 16 | sjcl | 256 | 80 | 10001 | 256 | SHA-256 | 10863/2 = 5431.5 |
> | 17 | quick | 256 | 80 | 10001 | 256 | SHA-256 | 931/200 = 4.655 |
> | 18 | quick | 256 | 80 | 10001 | 256 | SHA-512 | 3168/200 = 15.84 |
> | 19 | sjcl | 256 | 80 | 10001 | 512 | SHA-256 | 21732/2 = 10866.0 |
> | 20 | quick | 256 | 80 | 10001 | 512 | SHA-512 | 3171/200 = 15.855 |

> **PBKDF2 Performance (iOS device iOS 16.5.1)**
>
> (`quick` = `react-native-quick-crypto`)
> 
> | Case ID | Library | Salt Length (bits) | Password Length (bits) | Key Iteration Count | Key Size (bits) | Digest Function | Time (ms) |
> | --- | --- | --- | --- | --- | --- | --- | --- |
> | 1 | sjcl | 256 | 80 | 101 | 256 | SHA-256 | 2835/200 = 14.175 |
> | 2 | quick | 256 | 80 | 101 | 256 | SHA-256 | 2090/20000 = 0.1045 |
> | 3 | quick | 256 | 80 | 101 | 256 | SHA-512 | 2039/20000 = 0.10195 |
> | 4 | sjcl | 256 | 80 | 101 | 512 | SHA-256 | 5729/200 = 28.645 |
> | 5 | quick | 256 | 80 | 101 | 512 | SHA-512 | 2036/20000 = 0.1018 |
> | 6 | sjcl | 256 | 240 | 101 | 256 | SHA-256 | 2889/200 = 14.445 |
> | 7 | quick | 256 | 240 | 101 | 256 | SHA-256 | 2412/20000 = 0.1206 |
> | 8 | quick | 256 | 240 | 101 | 256 | SHA-512 | 2353/20000 = 0.11765 |
> | 9 | sjcl | 256 | 240 | 101 | 512 | SHA-256 | 5778/200 = 28.89 |
> | 10 | quick | 256 | 240 | 101 | 512 | SHA-512 | 2355/20000 = 0.11775 |
> | 11 | sjcl | 512 | 240 | 101 | 256 | SHA-256 | 2907/200 = 14.535 |
> | 12 | quick | 512 | 240 | 101 | 256 | SHA-256 | 2419/20000 = 0.12095 |
> | 13 | quick | 512 | 240 | 101 | 256 | SHA-512 | 2353/20000 = 0.11765 |
> | 14 | sjcl | 512 | 240 | 101 | 512 | SHA-256 | 5796/200 = 28.98 |
> | 15 | quick | 512 | 240 | 101 | 512 | SHA-512 | 2356/20000 = 0.1178 |
> | 16 | sjcl | 256 | 80 | 10001 | 256 | SHA-256 | 2846/2 = 1423.0 |
> | 17 | quick | 256 | 80 | 10001 | 256 | SHA-256 | 1366/200 = 6.83 |
> | 18 | quick | 256 | 80 | 10001 | 256 | SHA-512 | 1303/200 = 6.515 |
> | 19 | sjcl | 256 | 80 | 10001 | 512 | SHA-256 | 5686/2 = 2843.0 |
> | 20 | quick | 256 | 80 | 10001 | 512 | SHA-512 | 1303/200 = 6.515 |

> **Encryption/Decryption Performance (Android device API 27)**
>
> (`quick` = `react-native-quick-crypto`, Mode: AES-GCM, IV Size: 96 bits, Authentication Tag Size: 64 bits, No Associated Data)
> 
> | Case ID | Library | Operation | Test Count | Plaintext Size (bytes) | Key Size (bits) | Time (ms) | Speed (bytes/s) |
> | --- | --- | --- | --- | --- | --- | --- | --- |
> | 1 | quick | encrypt | 500 | 256 | 256 | 190.34 | 672,484.51 |
> | 2 | sjcl | encrypt | 25 | 256 | 256 | 307.35 | 20,823.26 |
> | 3 | quick | decrypt | 500 | 256 | 256 | 196.64 | 650,952.10 |
> | 4 | sjcl | decrypt | 25 | 256 | 256 | 314.05 | 20,379.23 |
> | 5 | quick | encrypt | 40 | 1280000 | 128 | 404.88 | 126,458,360.67 |
> | 6 | sjcl | encrypt | 2 | 1280000 | 128 | 110,086.10 | 23,254.52 |
> | 7 | quick | decrypt | 40 | 1280000 | 128 | 538.84 | 95,018,277.45 |
> | 8 | sjcl | decrypt | 2 | 1280000 | 128 | 111,544.72 | 22,950.44 |
> | 9 | quick | encrypt | 40 | 1280000 | 256 | 378.05 | 135,431,914.33 |
> | 10 | sjcl | encrypt | 2 | 1280000 | 256 | 112,617.72 | 22,731.77 |
> | 11 | quick | decrypt | 40 | 1280000 | 256 | 412.50 | 124,120,193.28 |
> | 12 | sjcl | decrypt | 2 | 1280000 | 256 | 113,562.40 | 22,542.67 |

> **Encryption/Decryption Performance (iOS device iOS 16.5.1)**
>
> (`quick` = `react-native-quick-crypto`, Mode: AES-GCM, IV Size: 96 bits, Authentication Tag Size: 64 bits, No Associated Data)
> 
> | Case ID | Library | Operation | Test Count | Plaintext Size (bytes) | Key Size (bits) | Time (ms) | Speed (bytes/s) |
> | --- | --- | --- | --- | --- | --- | --- | --- |
> | 1 | quick | encrypt | 500 | 256 | 256 | 77.42 | 1,653,303.54 |
> | 2 | sjcl | encrypt | 25 | 256 | 256 | 78.42 | 81,615.09 |
> | 3 | quick | decrypt | 500 | 256 | 256 | 78.55 | 1,629,612.25 |
> | 4 | sjcl | decrypt | 25 | 256 | 256 | 79.13 | 80,882.67 |
> | 5 | quick | encrypt | 40 | 1280000 | 128 | 1,473.28 | 34,752,406.92 |
> | 6 | sjcl | encrypt | 2 | 1280000 | 128 | 27,935.87 | 91,638.46 |
> | 7 | quick | decrypt | 40 | 1280000 | 128 | 1,516.81 | 33,755,027.60 |
> | 8 | sjcl | decrypt | 2 | 1280000 | 128 | 28,701.68 | 89,193.40 |
> | 9 | quick | encrypt | 40 | 1280000 | 256 | 1,468.04 | 34,876,334.89 |
> | 10 | sjcl | encrypt | 2 | 1280000 | 256 | 29,685.97 | 86,236.02 |
> | 11 | quick | decrypt | 40 | 1280000 | 256 | 1,449.45 | 35,323,813.55 |
> | 12 | sjcl | decrypt | 2 | 1280000 | 256 | 30,299.53 | 84,489.75 |

> **Base64 Performance (Android device API 27)**
>
> (`rnqc` = `react-native-quick-crypto`, `rnqb` = `react-native-quick-base64`)
> 
> | Case ID | Library | Operation | Test Count | Data Size (bytes) | Time (ms) | Speed (bytes/s) |
> | --- | --- | --- | --- | --- | --- | --- |
> | 1 | rnqc | encode | 500 | 256 | 185.19 | 691,197.00 |
> | 2 | rnqc | decode | 500 | 256 | 514.14 | 248,960.61 |
> | 3 | rnqb | encode | 500 | 256 | 180.39 | 709,583.94 |
> | 4 | rnqb | decode | 500 | 256 | 141.99 | 901,477.88 |
> | 5 | sjcl | encode | 500 | 256 | 256.30 | 499,421.95 |
> | 6 | sjcl | decode | 500 | 256 | 318.81 | 401,496.66 |
> | 7 | rnqc | encode | 500 | 25600 | 17,733.97 | 721,778.74 |
> | 8 | rnqc | decode | 500 | 25600 | 47,937.00 | 267,017.14 |
> | 9 | rnqb | encode | 500 | 25600 | 17,710.00 | 722,755.30 |
> | 10 | rnqb | decode | 500 | 25600 | 13,571.85 | 943,128.49 |
> | 11 | sjcl | encode | 500 | 25600 | 24,068.65 | 531,812.20 |
> | 12 | sjcl | decode | 500 | 25600 | 31,250.80 | 409,589.53 |
> | 13 | rnqc | encode | 500 | 51200 | 35,790.09 | 715,281.74 |
> | 14 | rnqc | decode | 500 | 51200 | 95,906.07 | 266,927.84 |
> | 15 | rnqb | encode | 500 | 51200 | 35,984.08 | 711,425.79 |
> | 16 | rnqb | decode | 500 | 51200 | 27,269.71 | 938,770.60 |
> | 17 | sjcl | encode | 500 | 51200 | 49,030.35 | 522,125.63 |
> | 18 | sjcl | decode | 500 | 51200 | 62,457.43 | 409,879.20 |

> **Base64 Performance (iOS device iOS 16.5.1)**
>
> (`rnqc` = `react-native-quick-crypto`, `rnqb` = `react-native-quick-base64`)
> 
> | Case ID | Library | Operation | Test Count | Data Size (bytes) | Time (ms) | Speed (bytes/s) |
> | --- | --- | --- | --- | --- | --- | --- |
> | 1 | rnqc | encode | 500 | 256 | 38.77 | 3,301,255.70 |
> | 2 | rnqc | decode | 500 | 256 | 105.86 | 1,209,144.15 |
> | 3 | rnqb | encode | 500 | 256 | 37.14 | 3,446,620.05 |
> | 4 | rnqb | decode | 500 | 256 | 29.44 | 4,347,106.25 |
> | 5 | sjcl | encode | 500 | 256 | 57.39 | 2,230,496.20 |
> | 6 | sjcl | decode | 500 | 256 | 70.99 | 1,803,031.69 |
> | 7 | rnqc | encode | 500 | 25600 | 3,675.70 | 3,482,328.24 |
> | 8 | rnqc | decode | 500 | 25600 | 10,002.21 | 1,279,717.44 |
> | 9 | rnqb | encode | 500 | 25600 | 3,733.52 | 3,428,395.88 |
> | 10 | rnqb | decode | 500 | 25600 | 2,770.36 | 4,620,341.70 |
> | 11 | sjcl | encode | 500 | 25600 | 5,470.24 | 2,339,931.85 |
> | 12 | sjcl | decode | 500 | 25600 | 7,086.35 | 1,806,289.40 |
> | 13 | rnqc | encode | 500 | 51200 | 7,454.45 | 3,434,191.49 |
> | 14 | rnqc | decode | 500 | 51200 | 20,178.54 | 1,268,674.61 |
> | 15 | rnqb | encode | 500 | 51200 | 7,534.49 | 3,397,707.22 |
> | 16 | rnqb | decode | 500 | 51200 | 5,536.34 | 4,623,994.16 |
> | 17 | sjcl | encode | 500 | 51200 | 11,173.97 | 2,291,039.80 |
> | 18 | sjcl | decode | 500 | 51200 | 14,196.71 | 1,803,234.88 |

# Conclusion

1. The parameters of encryption/decryption don't affect the speed a lot. The bottleneck is the speed of base64 encoding/decoding after switching to the native encryption library.
2. Due to the speed limitation of base64 encoding/decoding, the overall encryption/decryption speed on mobile clients will be limited to a few megabytes per second or even slower.
3. We can expect at least 10X speed improvement after switching to the native encryption library, based on the speed of base64 encoding/decoding and the speed of encryption/decryption of sjcl.

I will post the raw test results and payloads below.

---

<div class="post-metadata">

**Author:** ![wh201906](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/wh201906/32/14835_2.png) [@wh201906](https://discourse.joplinapp.org/u/wh201906)\
**Post date:** [16 June 2024 18:41 UTC](https://discourse.joplinapp.org/t/performance-test-of-react-native-quick-crypto/38622/2 "2024-06-16T18:41:23Z")

</div>

> **Android device API 27**
>
> ```auto
> LOG --------pbkdf2 performance--------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 101, key size: 256(32), digest method: SHA-256
> LOG pbkdf2(quick, 20000): 4021.4018210000067 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 765.5352600000042 ms
> LOG pbkdf2(sjcl, sha256, 200): 11143.330724999978 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 101, key size: 256(32), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 6319.049163999996 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 790.3839060000028 ms
> LOG pbkdf2(sjcl, sha256, 200): 11113.994214000006 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 101, key size: 512(64), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 6334.947184999997 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 761.745052000013 ms
> LOG pbkdf2(sjcl, sha256, 200): 22133.503689000005 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 240(30), key iteration count: 101, key size: 256(32), digest method: SHA-256
> LOG pbkdf2(quick, 20000): 5846.030154000007 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 789.1973960000032 ms
> LOG pbkdf2(sjcl, sha256, 200): 11130.084891000006 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 240(30), key iteration count: 101, key size: 256(32), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 8140.806089999998 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 714.0094270000118 ms
> LOG pbkdf2(sjcl, sha256, 200): 11101.180672999995 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 240(30), key iteration count: 101, key size: 512(64), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 8132.466612000018 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 764.9008330000215 ms
> LOG pbkdf2(sjcl, sha256, 200): 22097.227491999976 ms
> LOG ----------------
> LOG saltLength: 512(64), password length: 240(30), key iteration count: 101, key size: 256(32), digest method: SHA-256
> LOG pbkdf2(quick, 20000): 5828.766560000018 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 1097.2046879999689 ms
> LOG pbkdf2(sjcl, sha256, 200): 11131.767079000012 ms
> LOG ----------------
> LOG saltLength: 512(64), password length: 240(30), key iteration count: 101, key size: 256(32), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 8141.300673999998 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 1197.4815620000008 ms
> LOG pbkdf2(sjcl, sha256, 200): 11138.954058999952 ms
> LOG ----------------
> LOG saltLength: 512(64), password length: 240(30), key iteration count: 101, key size: 512(64), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 8140.141871 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 1171.2123439999996 ms
> LOG pbkdf2(sjcl, sha256, 200): 22152.005460999964 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 10001, key size: 256(32), digest method: SHA-256
> LOG pbkdf2(quick, 200): 930.7249989999691 ms
> LOG pbkdf2(sjcl, sha256, cached, 200): 5449.442393000005 ms
> LOG pbkdf2(sjcl, sha256, 2): 10862.848432999977 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 10001, key size: 256(32), digest method: SHA-512
> LOG pbkdf2(quick, 200): 3167.9286969999666 ms
> LOG pbkdf2(sjcl, sha256, cached, 200): 5455.010779000004 ms
> LOG pbkdf2(sjcl, sha256, 2): 10866.393589999992 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 10001, key size: 512(64), digest method: SHA-512
> LOG pbkdf2(quick, 200): 3171.0307279999834 ms
> LOG pbkdf2(sjcl, sha256, cached, 200): 5455.809476999973 ms
> LOG pbkdf2(sjcl, sha256, 2): 21731.539731000026 ms
> LOG --------encryption/decryption performance--------
> LOG plaintextLength: 2048(256), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 188.72182299999986 ms, 678246.9455056086 bytes/s
> LOG encryption(sjcl, 25): 301.523228999984 ms, 21225.562027927008 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 352
> LOG plaintextLength: 2048(256), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 202.73703100002604 ms, 631359.7440419435 bytes/s
> LOG decryption(sjcl, 25): 301.616978999984 ms, 21218.96459947084 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 344
> LOG ----------------
> LOG plaintextLength: 2048(256), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 190.33895800000755 ms, 672484.5052477114 bytes/s
> LOG encryption(sjcl, 25): 307.34854099998483 ms, 20823.264620606467 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 352
> LOG plaintextLength: 2048(256), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 196.6350519999978 ms, 650952.0998321369 bytes/s
> LOG decryption(sjcl, 25): 314.0451560000074 ms, 20379.234889392304 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 344
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 250.6910940000089 ms, 51058854.12905632 bytes/s
> LOG encryption(sjcl, 25): 27470.073686999967 ms, 23298.080933174773 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 272.5881769999978 ms, 46957282.3769246 bytes/s
> LOG decryption(sjcl, 25): 27938.903896000003 ms, 22907.126291795164 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 255.75635400001192 ms, 50047632.44317833 bytes/s
> LOG encryption(sjcl, 25): 28333.640770999948 ms, 22587.990197682357 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 271.87208300002385 ms, 47080964.91098307 bytes/s
> LOG decryption(sjcl, 25): 28592.353999999934 ms, 22383.606470457155 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 48(6)
> LOG encryption(quick, 500): 256.0346350000473 ms, 49993236.26663884 bytes/s
> LOG encryption(sjcl, 25): 27408.814051999943 ms, 23350.152939335258 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 48(6)
> LOG decryption(quick, 500): 279.10239500005264 ms, 45861304.77310159 bytes/s
> LOG decryption(sjcl, 25): 27706.283167000045 ms, 23099.45351176808 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 260.18083399999887 ms, 49196552.27179438 bytes/s
> LOG encryption(sjcl, 25): 28196.801915999968 ms, 22697.609534109575 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 275.00099000008777 ms, 46545286.98240656 bytes/s
> LOG decryption(sjcl, 25): 28607.098999000038 ms, 22372.069255340124 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 128(16), adataLength: 0(0)
> LOG encryption(quick, 500): 256.55552099994384 ms, 49891734.740733966 bytes/s
> LOG encryption(sjcl, 25): 27528.129781000083 ms, 23248.945899758437 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34156
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 128(16), adataLength: 0(0)
> LOG decryption(quick, 500): 273.30322999996133 ms, 46834426.36225635 bytes/s
> LOG decryption(sjcl, 25): 27871.182124999934 ms, 22962.786333556043 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 256.9924999999348 ms, 49806900.97961321 bytes/s
> LOG encryption(sjcl, 25): 28206.763843999943 ms, 22689.59330249928 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 277.56786499999 ms, 46114848.34528832 bytes/s
> LOG decryption(sjcl, 25): 28421.573218000005 ms, 22518.106055954497 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 128(16), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 255.62968699994963 ms, 50072431.53258065 bytes/s
> LOG encryption(sjcl, 25): 27500.288113999995 ms, 23272.483449880125 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 128(16), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 273.160624000011 ms, 46858876.702520214 bytes/s
> LOG decryption(sjcl, 25): 27686.959365000017 ms, 23115.575515635883 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 128(16), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 256.412135999999 ms, 49919634.06911461 bytes/s
> LOG encryption(sjcl, 25): 28228.360614000005 ms, 22672.234096463562 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 128(16), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 278.3340099999914 ms, 45987912.149149135 bytes/s
> LOG decryption(sjcl, 25): 28501.464311999967 ms, 22454.986627846378 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 5120000(640000), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 40): 246.7264069999801 ms, 103758654.41919261 bytes/s
> LOG encryption(sjcl, 2): 55010.06898999994 ms, 23268.467455161455 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 853344
> LOG plaintextLength: 5120000(640000), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 40): 223.55494800000452 ms, 114513233.67711586 bytes/s
> LOG decryption(sjcl, 2): 55278.28763500007 ms, 23155.565318010205 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 853336
> LOG ----------------
> LOG plaintextLength: 5120000(640000), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 40): 209.75369800021872 ms, 122047907.82746203 bytes/s
> LOG encryption(sjcl, 2): 56481.007895000046 ms, 22662.485102595194 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 853344
> LOG plaintextLength: 5120000(640000), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 40): 230.03447899990715 ms, 111287664.83745392 bytes/s
> LOG decryption(sjcl, 2): 56577.444457999896 ms, 22623.856772997307 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 853336
> LOG ----------------
> LOG plaintextLength: 10240000(1280000), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 40): 404.8763540000655 ms, 126458360.66778976 bytes/s
> LOG encryption(sjcl, 2): 110086.10193699994 ms, 23254.52491237301 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 1706680
> LOG plaintextLength: 10240000(1280000), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 40): 538.8436980000697 ms, 95018277.45231119 bytes/s
> LOG decryption(sjcl, 2): 111544.71855099988 ms, 22950.436679164963 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 1706668
> LOG ----------------
> LOG plaintextLength: 10240000(1280000), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 40): 378.0497400001623 ms, 135431914.3295219 bytes/s
> LOG encryption(sjcl, 2): 112617.72032100009 ms, 22731.76896764648 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 1706680
> LOG plaintextLength: 10240000(1280000), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 40): 412.5033859999385 ms, 124120193.28250468 bytes/s
> LOG decryption(sjcl, 2): 113562.39818600006 ms, 22542.672934812996 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 1706668
> LOG --------base64 performance--------
> LOG dataLength: 2048(256)
> LOG encode(rnqc, 500): 185.18598999991082 ms, 691196.996058188 bytes/s
> LOG decode(rnqc, 500): 514.1375520001166 ms, 248960.61278163744 bytes/s
> LOG encode(rnqb, 500): 180.38739599986002 ms, 709583.9445462106 bytes/s
> LOG decode(rnqb, 500): 141.98906300007366 ms, 901477.8835460983 bytes/s
> LOG encode(sjcl, 500): 256.2963020000607 ms, 499421.9542034972 bytes/s
> LOG decode(sjcl, 500): 318.8071349998936 ms, 401496.66035561817 bytes/s
> LOG dataLength: 204800(25600)
> LOG encode(rnqc, 500): 17733.966399000026 ms, 721778.7443604134 bytes/s
> LOG decode(rnqc, 500): 47936.99732600013 ms, 267017.14154001715 bytes/s
> LOG encode(rnqb, 500): 17710.004994000075 ms, 722755.3015561813 bytes/s
> LOG decode(rnqb, 500): 13571.851765000029 ms, 943128.4854591081 bytes/s
> LOG encode(sjcl, 500): 24068.64671 ms, 531812.2017504988 bytes/s
> LOG decode(sjcl, 500): 31250.79884299985 ms, 409589.5296726851 bytes/s
> LOG dataLength: 409600(51200)
> LOG encode(rnqc, 500): 35790.092955 ms, 715281.7410166461 bytes/s
> LOG decode(rnqc, 500): 95906.07064100006 ms, 266927.83708996983 bytes/s
> LOG encode(rnqb, 500): 35984.07633999991 ms, 711425.7917339684 bytes/s
> LOG decode(rnqb, 500): 27269.70780199999 ms, 938770.6016462145 bytes/s
> LOG encode(sjcl, 500): 49030.34518999979 ms, 522125.63262192503 bytes/s
> LOG decode(sjcl, 500): 62457.42643500026 ms, 409879.2003004165 bytes/s
> 
> ```

> **Android device API 31**
>
> ```auto
> LOG --------pbkdf2 performance--------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 101, key size: 256(32), digest method: SHA-256
> LOG pbkdf2(quick, 20000): 868.8076149821281 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 186.29946100711823 ms
> LOG pbkdf2(sjcl, sha256, 200): 2106.58253800869 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 101, key size: 256(32), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 1731.124614983797 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 165.4270770251751 ms
> LOG pbkdf2(sjcl, sha256, 200): 2127.144923001528 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 101, key size: 512(64), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 1740.8479999899864 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 165.47022998332977 ms
> LOG pbkdf2(sjcl, sha256, 200): 4216.086154013872 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 240(30), key iteration count: 101, key size: 256(32), digest method: SHA-256
> LOG pbkdf2(quick, 20000): 1274.2160769999027 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 186.9664610028267 ms
> LOG pbkdf2(sjcl, sha256, 200): 2113.7058460116386 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 240(30), key iteration count: 101, key size: 256(32), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 2129.2624610066414 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 149.647077023983 ms
> LOG pbkdf2(sjcl, sha256, 200): 2120.6947700083256 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 240(30), key iteration count: 101, key size: 512(64), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 2136.4350770115852 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 155.90776899456978 ms
> LOG pbkdf2(sjcl, sha256, 200): 4212.477539002895 ms
> LOG ----------------
> LOG saltLength: 512(64), password length: 240(30), key iteration count: 101, key size: 256(32), digest method: SHA-256
> LOG pbkdf2(quick, 20000): 1275.8089230060577 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 275.27538499236107 ms
> LOG pbkdf2(sjcl, sha256, 200): 2127.476307988167 ms
> LOG ----------------
> LOG saltLength: 512(64), password length: 240(30), key iteration count: 101, key size: 256(32), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 2140.418154001236 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 261.3585389852524 ms
> LOG pbkdf2(sjcl, sha256, 200): 2130.611691981554 ms
> LOG ----------------
> LOG saltLength: 512(64), password length: 240(30), key iteration count: 101, key size: 512(64), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 2144.323307991028 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 257.79346200823784 ms
> LOG pbkdf2(sjcl, sha256, 200): 4241.502461999655 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 10001, key size: 256(32), digest method: SHA-256
> LOG pbkdf2(quick, 200): 254.15669199824333 ms
> LOG pbkdf2(sjcl, sha256, cached, 200): 1047.011000007391 ms
> LOG pbkdf2(sjcl, sha256, 2): 2080.0224620103836 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 10001, key size: 256(32), digest method: SHA-512
> LOG pbkdf2(quick, 200): 1095.5983850061893 ms
> LOG pbkdf2(sjcl, sha256, cached, 200): 1045.2300769984722 ms
> LOG pbkdf2(sjcl, sha256, 2): 2079.1328470110893 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 10001, key size: 512(64), digest method: SHA-512
> LOG pbkdf2(quick, 200): 1094.9337700009346 ms
> LOG pbkdf2(sjcl, sha256, cached, 200): 1048.8274620175362 ms
> LOG pbkdf2(sjcl, sha256, 2): 4163.254231005907 ms
> LOG --------encryption/decryption performance--------
> LOG plaintextLength: 2048(256), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 43.82523101568222 ms, 2920691.9629059588 bytes/s
> LOG encryption(sjcl, 25): 60.67638498544693 ms, 105477.60881824161 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 352
> LOG plaintextLength: 2048(256), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 43.70038399100304 ms, 2929036.0475173956 bytes/s
> LOG decryption(sjcl, 25): 62.01776999235153 ms, 103196.22909352099 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 344
> LOG ----------------
> LOG plaintextLength: 2048(256), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 40.74992302060127 ms, 3141110.228239919 bytes/s
> LOG encryption(sjcl, 25): 63.18215399980545 ms, 101294.42563828557 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 352
> LOG plaintextLength: 2048(256), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 44.32823097705841 ms, 2887550.3754310654 bytes/s
> LOG decryption(sjcl, 25): 63.48115399479866 ms, 100817.32289435672 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 344
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 75.71169200539589 ms, 169062395.26502404 bytes/s
> LOG encryption(sjcl, 25): 5460.3779229819775 ms, 117208.0044691281 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 87.89853900671005 ms, 145622443.15599906 bytes/s
> LOG decryption(sjcl, 25): 5527.711461991072 ms, 115780.28346824621 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 78.47715398669243 ms, 163104793.55775985 bytes/s
> LOG encryption(sjcl, 25): 5681.430999994278 ms, 112647.67626336473 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 85.70676898956299 ms, 149346430.2867225 bytes/s
> LOG decryption(sjcl, 25): 5678.966385006905 ms, 112696.56423564513 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 48(6)
> LOG encryption(quick, 500): 78.71238401532173 ms, 162617358.8835579 bytes/s
> LOG encryption(sjcl, 25): 5502.863384991884 ms, 116303.08717921113 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 48(6)
> LOG decryption(quick, 500): 89.32715398073196 ms, 143293493.96669444 bytes/s
> LOG decryption(sjcl, 25): 5563.624691992998 ms, 115032.92105973087 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 79.94946199655533 ms, 160101139.8994967 bytes/s
> LOG encryption(sjcl, 25): 5670.5016150176525 ms, 112864.79458978298 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 89.69846200942993 ms, 142700328.55919364 bytes/s
> LOG decryption(sjcl, 25): 5720.487614989281 ms, 111878.57453323047 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 128(16), adataLength: 0(0)
> LOG encryption(quick, 500): 76.16038501262665 ms, 168066377.2626397 bytes/s
> LOG encryption(sjcl, 25): 5500.739924013615 ms, 116347.98387868954 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34156
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 128(16), adataLength: 0(0)
> LOG decryption(quick, 500): 89.08699998259544 ms, 143679773.73242652 bytes/s
> LOG decryption(sjcl, 25): 5594.178770005703 ms, 114404.63852022155 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 89.27592301368713 ms, 143375722.90389648 bytes/s
> LOG encryption(sjcl, 25): 5638.350538998842 ms, 113508.37369427545 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 89.69330698251724 ms, 142708530.10799277 bytes/s
> LOG decryption(sjcl, 25): 5755.070769011974 ms, 111206.27802633861 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 128(16), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 78.46676898002625 ms, 163126380.33124885 bytes/s
> LOG encryption(sjcl, 25): 5485.097847014666 ms, 116679.77816445484 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 128(16), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 87.7800000011921 ms, 145819093.18553394 bytes/s
> LOG decryption(sjcl, 25): 5592.894692987204 ms, 114430.90476966796 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 128(16), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 78.84792298078537 ms, 162337820.910251 bytes/s
> LOG encryption(sjcl, 25): 5645.076000005007 ms, 113373.14147753411 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 128(16), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 87.80061599612236 ms, 145784854.18103787 bytes/s
> LOG decryption(sjcl, 25): 5720.323307991028 ms, 111881.78806361338 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 5120000(640000), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 40): 122.17815399169922 ms, 209530093.25823718 bytes/s
> LOG encryption(sjcl, 2): 10904.30961599946 ms, 117384.78134570821 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 853344
> LOG plaintextLength: 5120000(640000), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 40): 87.59261497855186 ms, 292262081.7550484 bytes/s
> LOG decryption(sjcl, 2): 11882.468692988157 ms, 107721.72290723794 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 853336
> LOG ----------------
> LOG plaintextLength: 5120000(640000), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 40): 83.993537992239 ms, 304785351.4917474 bytes/s
> LOG encryption(sjcl, 2): 11672.900539010763 ms, 109655.69317773657 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 853344
> LOG plaintextLength: 5120000(640000), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 40): 85.79046201705933 ms, 298401470.25795794 bytes/s
> LOG decryption(sjcl, 2): 12264.603000998497 ms, 104365.38385268496 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 853336
> LOG ----------------
> LOG plaintextLength: 10240000(1280000), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 40): 199.06984597444534 ms, 257196160.21892416 bytes/s
> LOG encryption(sjcl, 2): 23964.385616987944 ms, 106825.18804843716 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 1706680
> LOG plaintextLength: 10240000(1280000), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 40): 132.90338498353958 ms, 385242257.0451554 bytes/s
> LOG decryption(sjcl, 2): 25532.221000999212 ms, 100265.46456337713 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 1706668
> LOG ----------------
> LOG plaintextLength: 10240000(1280000), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 40): 162.90153899788857 ms, 314300284.17757076 bytes/s
> LOG encryption(sjcl, 2): 25756.69915598631 ms, 99391.61786594891 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 1706680
> LOG plaintextLength: 10240000(1280000), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 40): 262.6147690117359 ms, 194962378.51616007 bytes/s
> LOG decryption(sjcl, 2): 25155.66461700201 ms, 101766.34324619544 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 1706668
> LOG --------base64 performance--------
> LOG dataLength: 2048(256)
> LOG encode(rnqc, 500): 41.16492301225662 ms, 3109443.444407481 bytes/s
> LOG decode(rnqc, 500): 107.94084602594376 ms, 1185834.6929135148 bytes/s
> LOG encode(rnqb, 500): 39.6429999768734 ms, 3228817.1953351554 bytes/s
> LOG decode(rnqb, 500): 27.264999985694885 ms, 4694663.49045141 bytes/s
> LOG encode(sjcl, 500): 55.77315402030945 ms, 2295010.9644756615 bytes/s
> LOG decode(sjcl, 500): 70.76638400554657 ms, 1808768.4117075636 bytes/s
> LOG dataLength: 204800(25600)
> LOG encode(rnqc, 500): 3946.6369229853153 ms, 3243267.6858244725 bytes/s
> LOG decode(rnqc, 500): 10068.408616006374 ms, 1271303.1908191573 bytes/s
> LOG encode(rnqb, 500): 3932.299693018198 ms, 3255092.693653643 bytes/s
> LOG decode(rnqb, 500): 2638.8668459951878 ms, 4850566.833042603 bytes/s
> LOG encode(sjcl, 500): 5304.336000978947 ms, 2413120.1337241237 bytes/s
> LOG decode(sjcl, 500): 6953.959078013897 ms, 1840678.073655817 bytes/s
> LOG dataLength: 409600(51200)
> LOG encode(rnqc, 500): 8027.735385000706 ms, 3188944.1756926756 bytes/s
> LOG decode(rnqc, 500): 19840.24869400263 ms, 1290306.4066801968 bytes/s
> LOG encode(rnqb, 500): 7580.312923997641 ms, 3377169.287953259 bytes/s
> LOG decode(rnqb, 500): 4936.67007702589 ms, 5185681.765353618 bytes/s
> LOG encode(sjcl, 500): 10761.898846000433 ms, 2378762.3695714273 bytes/s
> LOG decode(sjcl, 500): 13952.525309026241 ms, 1834793.3032193615 bytes/s
> 
> ```

> **Android emulator API 23**
>
> ```auto
> 
> LOG --------pbkdf2 performance--------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 101, key size: 256(32), digest method: SHA-256
> LOG pbkdf2(quick, 20000): 1548.5679999999993 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 119.9951000000001 ms
> LOG pbkdf2(sjcl, sha256, 200): 1455.8929999999964 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 101, key size: 256(32), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 1384.7494999999908 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 122.49229999999807 ms
> LOG pbkdf2(sjcl, sha256, 200): 1442.5706999999966 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 101, key size: 512(64), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 1398.1156000000046 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 124.50840000000608 ms
> LOG pbkdf2(sjcl, sha256, 200): 3528.3723000000027 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 240(30), key iteration count: 101, key size: 256(32), digest method: SHA-256
> LOG pbkdf2(quick, 20000): 1617.2999999999884 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 135.86740000000282 ms
> LOG pbkdf2(sjcl, sha256, 200): 1612.951700000005 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 240(30), key iteration count: 101, key size: 256(32), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 1946.6875999999902 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 166.7966999999917 ms
> LOG pbkdf2(sjcl, sha256, 200): 1806.7418999999936 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 240(30), key iteration count: 101, key size: 512(64), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 1783.2065999999904 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 154.5283999999956 ms
> LOG pbkdf2(sjcl, sha256, 200): 3266.1935999999987 ms
> LOG ----------------
> LOG saltLength: 512(64), password length: 240(30), key iteration count: 101, key size: 256(32), digest method: SHA-256
> LOG pbkdf2(quick, 20000): 1566.0639999999985 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 230.76630000000296 ms
> LOG pbkdf2(sjcl, sha256, 200): 1665.425900000002 ms
> LOG ----------------
> LOG saltLength: 512(64), password length: 240(30), key iteration count: 101, key size: 256(32), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 1747.7416000000085 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 200.19800000000396 ms
> LOG pbkdf2(sjcl, sha256, 200): 1699.719100000002 ms
> LOG ----------------
> LOG saltLength: 512(64), password length: 240(30), key iteration count: 101, key size: 512(64), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 1779.4469999999856 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 232.8974000000162 ms
> LOG pbkdf2(sjcl, sha256, 200): 3271.500800000009 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 10001, key size: 256(32), digest method: SHA-256
> LOG pbkdf2(quick, 200): 807.1375000000116 ms
> LOG pbkdf2(sjcl, sha256, cached, 200): 758.4731000000029 ms
> LOG pbkdf2(sjcl, sha256, 2): 1615.1998000000021 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 10001, key size: 256(32), digest method: SHA-512
> LOG pbkdf2(quick, 200): 1138.428500000009 ms
> LOG pbkdf2(sjcl, sha256, cached, 200): 786.1908999999869 ms
> LOG pbkdf2(sjcl, sha256, 2): 1588.7351999999955 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 10001, key size: 512(64), digest method: SHA-512
> LOG pbkdf2(quick, 200): 1081.0587999999989 ms
> LOG pbkdf2(sjcl, sha256, cached, 200): 810.170299999998 ms
> LOG pbkdf2(sjcl, sha256, 2): 3107.819999999978 ms
> LOG --------encryption/decryption performance--------
> LOG plaintextLength: 2048(256), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 38.05259999999544 ms, 3363764.8938578535 bytes/s
> LOG encryption(sjcl, 25): 56.431400000001304 ms, 113412.03656120267 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 352
> LOG plaintextLength: 2048(256), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 41.72609999999986 ms, 3067624.3406405207 bytes/s
> LOG decryption(sjcl, 25): 50.97090000001481 ms, 125561.84018720762 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 344
> LOG ----------------
> LOG plaintextLength: 2048(256), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 37.476699999999255 ms, 3415455.46966522 bytes/s
> LOG encryption(sjcl, 25): 51.802700000000186 ms, 123545.68391222807 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 352
> LOG plaintextLength: 2048(256), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 36.76850000000559 ms, 3481240.73595552 bytes/s
> LOG decryption(sjcl, 25): 47.11419999998179 ms, 135840.15010341836 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 344
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 53.0283000000054 ms, 241380545.85945046 bytes/s
> LOG encryption(sjcl, 25): 4172.349299999973 ms, 153390.8007174769 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 61.2219000000041 ms, 209075510.56074938 bytes/s
> LOG decryption(sjcl, 25): 4169.268299999996 ms, 153504.15323475358 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 67.62069999999949 ms, 189291149.0120643 bytes/s
> LOG encryption(sjcl, 25): 5072.448000000004 ms, 126171.82078554566 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 68.98769999999786 ms, 185540320.95577034 bytes/s
> LOG decryption(sjcl, 25): 4392.491699999984 ms, 145703.17799348428 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 48(6)
> LOG encryption(quick, 500): 62.889100000000326 ms, 203532885.66699052 bytes/s
> LOG encryption(sjcl, 25): 4035.0599999999977 ms, 158609.78523243777 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 48(6)
> LOG decryption(quick, 500): 79.97450000001118 ms, 160051016.26141095 bytes/s
> LOG decryption(sjcl, 25): 4140.283100000001 ms, 154578.80162832342 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 70.86329999999725 ms, 180629465.46379432 bytes/s
> LOG encryption(sjcl, 25): 4211.445099999983 ms, 151966.83912607637 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 75.58920000001672 ms, 169336360.22073483 bytes/s
> LOG decryption(sjcl, 25): 4265.6685 ms, 150035.10000835743 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 128(16), adataLength: 0(0)
> LOG encryption(quick, 500): 70.3125 ms, 182044444.44444445 bytes/s
> LOG encryption(sjcl, 25): 4169.717900000018 ms, 153487.6016432664 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34156
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 128(16), adataLength: 0(0)
> LOG decryption(quick, 500): 77.66630000001169 ms, 164807645.01460832 bytes/s
> LOG decryption(sjcl, 25): 4163.233000000007 ms, 153726.68308499642 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 70.32190000000992 ms, 182020110.3781069 bytes/s
> LOG encryption(sjcl, 25): 4225.149200000014 ms, 151473.94084923624 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 76.67689999999129 ms, 166934239.64716172 bytes/s
> LOG decryption(sjcl, 25): 4257.34580000001 ms, 150328.40414325715 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 128(16), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 66.86220000000321 ms, 191438510.84767455 bytes/s
> LOG encryption(sjcl, 25): 4138.516100000008 ms, 154644.80130933857 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 128(16), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 74.90159999998286 ms, 170890875.4953556 bytes/s
> LOG decryption(sjcl, 25): 4152.943899999984 ms, 154107.54766034824 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 128(16), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 69.98530000000028 ms, 182895550.92283592 bytes/s
> LOG encryption(sjcl, 25): 4264.298800000019 ms, 150083.29153669934 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 128(16), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 74.37029999998049 ms, 172111716.63961768 bytes/s
> LOG decryption(sjcl, 25): 4337.432700000005 ms, 147552.72168257486 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 5120000(640000), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 40): 85.01380000001518 ms, 301127581.63963294 bytes/s
> LOG encryption(sjcl, 2): 8481.525900000008 ms, 150916.2402015419 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 853344
> LOG plaintextLength: 5120000(640000), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 40): 71.32710000002407 ms, 358909867.357447 bytes/s
> LOG decryption(sjcl, 2): 8390.72569999998 ms, 152549.3796084888 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 853336
> LOG ----------------
> LOG plaintextLength: 5120000(640000), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 40): 59.873400000011316 ms, 427568836.91247135 bytes/s
> LOG encryption(sjcl, 2): 8423.263600000006 ms, 151960.10249518952 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 853344
> LOG plaintextLength: 5120000(640000), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 40): 79.43029999997816 ms, 322295144.2964088 bytes/s
> LOG decryption(sjcl, 2): 8469.521400000027 ms, 151130.14532320516 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 853336
> LOG ----------------
> LOG plaintextLength: 10240000(1280000), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 40): 152.00400000001537 ms, 336833241.23045987 bytes/s
> LOG encryption(sjcl, 2): 16543.849600000016 ms, 154740.2848729958 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 1706680
> LOG plaintextLength: 10240000(1280000), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 40): 155.69709999999031 ms, 328843632.9257461 bytes/s
> LOG decryption(sjcl, 2): 16613.952700000023 ms, 154087.35333645175 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 1706668
> LOG ----------------
> LOG plaintextLength: 10240000(1280000), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 40): 119.53720000002068 ms, 428318548.53544456 bytes/s
> LOG encryption(sjcl, 2): 16870.33249999996 ms, 151745.67543348693 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 1706680
> LOG plaintextLength: 10240000(1280000), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 40): 125.64069999998901 ms, 407511260.2843225 bytes/s
> LOG decryption(sjcl, 2): 17848.68670000002 ms, 143427.91954547542 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 1706668
> LOG --------base64 performance--------
> LOG dataLength: 2048(256)
> LOG encode(rnqc, 500): 38.08969999989495 ms, 3360488.5310294656 bytes/s
> LOG decode(rnqc, 500): 71.50250000006054 ms, 1790147.1976489162 bytes/s
> LOG encode(rnqb, 500): 27.868000000016764 ms, 4593081.670730695 bytes/s
> LOG decode(rnqb, 500): 18.020699999993667 ms, 7102942.726977586 bytes/s
> LOG encode(sjcl, 500): 38.09420000005048 ms, 3360091.562490626 bytes/s
> LOG decode(sjcl, 500): 55.51630000001751 ms, 2305629.1575620067 bytes/s
> LOG dataLength: 204800(25600)
> LOG encode(rnqc, 500): 2310.926600000006 ms, 5538903.745363425 bytes/s
> LOG decode(rnqc, 500): 6020.121600000071 ms, 2126202.8992902483 bytes/s
> LOG encode(rnqb, 500): 2665.782899999991 ms, 4801591.307379173 bytes/s
> LOG decode(rnqb, 500): 1926.1729999999516 ms, 6645301.330669842 bytes/s
> LOG encode(sjcl, 500): 3419.234599999967 ms, 3743527.8643940147 bytes/s
> LOG decode(sjcl, 500): 4650.792200000025 ms, 2752219.288576241 bytes/s
> LOG dataLength: 409600(51200)
> LOG encode(rnqc, 500): 5377.621500000008 ms, 4760468.9173457 bytes/s
> LOG decode(rnqc, 500): 13585.297900000005 ms, 1884390.0360845227 bytes/s
> LOG encode(rnqb, 500): 5386.241299999994 ms, 4752850.563898804 bytes/s
> LOG decode(rnqb, 500): 3777.0258999998914 ms, 6777819.553739553 bytes/s
> LOG encode(sjcl, 500): 6834.904500000062 ms, 3745480.27701042 bytes/s
> LOG decode(sjcl, 500): 9327.929000000004 ms, 2744446.275266459 bytes/s
> 
> ```

> **Android emulator API 26**
>
> ```auto
> LOG --------pbkdf2 performance--------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 101, key size: 256(32), digest method: SHA-256
> LOG pbkdf2(quick, 20000): 1563.0480000004172 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 154.44150000065565 ms
> LOG pbkdf2(sjcl, sha256, 200): 1521.9413000047207 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 101, key size: 256(32), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 1413.0707000046968 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 112.2373000010848 ms
> LOG pbkdf2(sjcl, sha256, 200): 1425.170100003481 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 101, key size: 512(64), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 1366.209800004959 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 135.6068999990821 ms
> LOG pbkdf2(sjcl, sha256, 200): 2899.394400000572 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 240(30), key iteration count: 101, key size: 256(32), digest method: SHA-256
> LOG pbkdf2(quick, 20000): 1342.0452999994159 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 100.06819999963045 ms
> LOG pbkdf2(sjcl, sha256, 200): 1436.6938999965787 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 240(30), key iteration count: 101, key size: 256(32), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 1626.2272000014782 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 136.8175000026822 ms
> LOG pbkdf2(sjcl, sha256, 200): 1623.611200004816 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 240(30), key iteration count: 101, key size: 512(64), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 1831.0076000019908 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 143.55900000035763 ms
> LOG pbkdf2(sjcl, sha256, 200): 3360.396800003946 ms
> LOG ----------------
> LOG saltLength: 512(64), password length: 240(30), key iteration count: 101, key size: 256(32), digest method: SHA-256
> LOG pbkdf2(quick, 20000): 1549.399899996817 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 240.67439999431372 ms
> LOG pbkdf2(sjcl, sha256, 200): 1714.5621999949217 ms
> LOG ----------------
> LOG saltLength: 512(64), password length: 240(30), key iteration count: 101, key size: 256(32), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 1780.7272000014782 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 213.61879999935627 ms
> LOG pbkdf2(sjcl, sha256, 200): 1658.4600999951363 ms
> LOG ----------------
> LOG saltLength: 512(64), password length: 240(30), key iteration count: 101, key size: 512(64), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 1816.9883999973536 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 192.7880000025034 ms
> LOG pbkdf2(sjcl, sha256, 200): 3301.476099997759 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 10001, key size: 256(32), digest method: SHA-256
> LOG pbkdf2(quick, 200): 791.2408000007272 ms
> LOG pbkdf2(sjcl, sha256, cached, 200): 810.720600001514 ms
> LOG pbkdf2(sjcl, sha256, 2): 1583.958799995482 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 10001, key size: 256(32), digest method: SHA-512
> LOG pbkdf2(quick, 200): 1108.497099995613 ms
> LOG pbkdf2(sjcl, sha256, cached, 200): 787.3247999995947 ms
> LOG pbkdf2(sjcl, sha256, 2): 1580.3535000011325 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 10001, key size: 512(64), digest method: SHA-512
> LOG pbkdf2(quick, 200): 1054.9430999979377 ms
> LOG pbkdf2(sjcl, sha256, cached, 200): 775.8823000043631 ms
> LOG pbkdf2(sjcl, sha256, 2): 3247.7850999981165 ms
> LOG --------encryption/decryption performance--------
> LOG plaintextLength: 2048(256), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 32.79560000449419 ms, 3902962.5920080543 bytes/s
> LOG encryption(sjcl, 25): 53.029600001871586 ms, 120687.31425042095 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 352
> LOG plaintextLength: 2048(256), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 42.82880000025034 ms, 2988643.1559897037 bytes/s
> LOG decryption(sjcl, 25): 52.8585000038147 ms, 121077.97231359429 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 344
> LOG ----------------
> LOG plaintextLength: 2048(256), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 36.62600000202656 ms, 3494785.12512744 bytes/s
> LOG encryption(sjcl, 25): 50.89959999918938 ms, 125737.72682107375 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 352
> LOG plaintextLength: 2048(256), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 36.04690000414848 ms, 3550929.4831252904 bytes/s
> LOG decryption(sjcl, 25): 49.29890000075102 ms, 129820.34081698583 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 344
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 47.08259999752045 ms, 271862641.4147498 bytes/s
> LOG encryption(sjcl, 25): 4242.178700000048 ms, 150865.87465068192 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 62.62550000101328 ms, 204389585.7085835 bytes/s
> LOG decryption(sjcl, 25): 4232.988899998367 ms, 151193.40379093526 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 69.30049999803305 ms, 184702852.0770168 bytes/s
> LOG encryption(sjcl, 25): 4278.639899998903 ms, 149580.24394625126 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 52.8433999940753 ms, 242225140.72590166 bytes/s
> LOG decryption(sjcl, 25): 4257.570799998939 ms, 150320.45973261548 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 48(6)
> LOG encryption(quick, 500): 47.18759999424219 ms, 271257703.32803214 bytes/s
> LOG encryption(sjcl, 25): 4071.2172999978065 ms, 157201.13981642414 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 48(6)
> LOG decryption(quick, 500): 55.27939999848604 ms, 231550993.68572304 bytes/s
> LOG decryption(sjcl, 25): 4134.944099999964 ms, 154778.39228830338 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 48.215400002896786 ms, 265475346.03531185 bytes/s
> LOG encryption(sjcl, 25): 4296.452699996531 ms, 148960.09445199216 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 52.607799999415874 ms, 243309927.42791227 bytes/s
> LOG decryption(sjcl, 25): 4297.413699999452 ms, 148926.7835675401 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 128(16), adataLength: 0(0)
> LOG encryption(quick, 500): 48.98600000143051 ms, 261299146.6873435 bytes/s
> LOG encryption(sjcl, 25): 4218.773599997163 ms, 151702.85506679723 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34156
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 128(16), adataLength: 0(0)
> LOG decryption(quick, 500): 53.23939999938011 ms, 240423445.79670388 bytes/s
> LOG decryption(sjcl, 25): 4230.149099998176 ms, 151294.90352958857 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 50.843699999153614 ms, 251751937.80572775 bytes/s
> LOG encryption(sjcl, 25): 4299.639299996197 ms, 148849.69536876408 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 52.17350000143051 ms, 245335275.5642049 bytes/s
> LOG decryption(sjcl, 25): 4257.624700002372 ms, 150318.5567294467 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 128(16), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 46.17729999870062 ms, 277192473.36592174 bytes/s
> LOG encryption(sjcl, 25): 4182.80150000006 ms, 153007.49987777113 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 128(16), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 65.34630000591278 ms, 195879491.24650985 bytes/s
> LOG decryption(sjcl, 25): 4120.094500005245 ms, 155336.242894231 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 128(16), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 49.99900000542402 ms, 256005120.07462993 bytes/s
> LOG encryption(sjcl, 25): 4306.944899998605 ms, 148597.21098363883 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 128(16), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 49.557700000703335 ms, 258284787.22415164 bytes/s
> LOG decryption(sjcl, 25): 4293.2285000011325 ms, 149071.96297607527 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 5120000(640000), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 40): 53.182099997997284 ms, 481364970.56272763 bytes/s
> LOG encryption(sjcl, 2): 8362.58330000192 ms, 153062.75035845756 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 853344
> LOG plaintextLength: 5120000(640000), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 40): 154.5287000015378 ms, 165665018.8589255 bytes/s
> LOG decryption(sjcl, 2): 8372.258400000632 ms, 152885.86888334734 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 853336
> LOG ----------------
> LOG plaintextLength: 5120000(640000), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 40): 90.58900000154972 ms, 282595017.05021644 bytes/s
> LOG encryption(sjcl, 2): 8502.949400000274 ms, 150536.00107275232 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 853344
> LOG plaintextLength: 5120000(640000), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 40): 63.20110000669956 ms, 405056241.06679 bytes/s
> LOG decryption(sjcl, 2): 8645.22919999808 ms, 148058.53845960315 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 853336
> LOG ----------------
> LOG plaintextLength: 10240000(1280000), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 40): 110.38949999958277 ms, 463812228.5198639 bytes/s
> LOG encryption(sjcl, 2): 16686.759700000286 ms, 153415.0455825139 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 1706680
> LOG plaintextLength: 10240000(1280000), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 40): 53.139299996197224 ms, 963505352.981014 bytes/s
> LOG decryption(sjcl, 2): 16721.83150000125 ms, 153093.27808977195 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 1706668
> LOG ----------------
> LOG plaintextLength: 10240000(1280000), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 40): 172.1664999946952 ms, 297386541.5256602 bytes/s
> LOG encryption(sjcl, 2): 16958.94539999962 ms, 150952.78271254164 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 1706680
> LOG plaintextLength: 10240000(1280000), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 40): 65.0785000026226 ms, 786742165.1995158 bytes/s
> LOG decryption(sjcl, 2): 17371.135700002313 ms, 147370.90563397412 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 1706668
> LOG --------base64 performance--------
> LOG dataLength: 2048(256)
> LOG encode(rnqc, 500): 38.973899997770786 ms, 3284249.2028593826 bytes/s
> LOG decode(rnqc, 500): 81.02219999581575 ms, 1579813.9276224335 bytes/s
> LOG encode(rnqb, 500): 28.133299998939037 ms, 4549768.424067818 bytes/s
> LOG decode(rnqb, 500): 18.265900000929832 ms, 7007593.384037146 bytes/s
> LOG encode(sjcl, 500): 40.04879999905825 ms, 3196100.7571515236 bytes/s
> LOG decode(sjcl, 500): 50.83519999682903 ms, 2517940.3249713643 bytes/s
> LOG dataLength: 204800(25600)
> LOG encode(rnqc, 500): 2439.6018999964 ms, 5246757.677971512 bytes/s
> LOG decode(rnqc, 500): 5801.767000004649 ms, 2206224.4140431257 bytes/s
> LOG encode(rnqb, 500): 2476.814899995923 ms, 5167927.566981719 bytes/s
> LOG decode(rnqb, 500): 1888.1620000004768 ms, 6779079.337470391 bytes/s
> LOG encode(sjcl, 500): 3412.252999998629 ms, 3751187.2654240886 bytes/s
> LOG decode(sjcl, 500): 4654.759399995208 ms, 2749873.6024923604 bytes/s
> LOG dataLength: 409600(51200)
> LOG encode(rnqc, 500): 5508.189800001681 ms, 4647624.887579616 bytes/s
> LOG decode(rnqc, 500): 13389.088899999857 ms, 1912004.6323689937 bytes/s
> LOG encode(rnqb, 500): 5403.413700006902 ms, 4737745.695830638 bytes/s
> LOG decode(rnqb, 500): 3591.748300001025 ms, 7127448.212335116 bytes/s
> LOG encode(sjcl, 500): 6818.862700000405 ms, 3754291.753080536 bytes/s
> LOG decode(sjcl, 500): 9177.39959999919 ms, 2789461.188984542 bytes/s
> 
> ```

---

<div class="post-metadata">

**Author:** ![wh201906](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/wh201906/32/14835_2.png) [@wh201906](https://discourse.joplinapp.org/u/wh201906)\
**Post date:** [16 June 2024 18:41 UTC](https://discourse.joplinapp.org/t/performance-test-of-react-native-quick-crypto/38622/3 "2024-06-16T18:41:41Z")

</div>

> **iOS device iOS 16.5.1**
>
> ```auto
> LOG --------pbkdf2 performance--------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 101, key size: 256(32), digest method: SHA-256
> LOG pbkdf2(quick, 20000): 2090.287958000321 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 189.92345800017938 ms
> LOG pbkdf2(sjcl, sha256, 200): 2834.549875000026 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 101, key size: 256(32), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 2039.434915999882 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 192.5401249998249 ms
> LOG pbkdf2(sjcl, sha256, 200): 2850.496499999892 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 101, key size: 512(64), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 2035.6628749999218 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 200.799083000049 ms
> LOG pbkdf2(sjcl, sha256, 200): 5729.08579199994 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 240(30), key iteration count: 101, key size: 256(32), digest method: SHA-256
> LOG pbkdf2(quick, 20000): 2411.8716249996796 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 166.7660000002943 ms
> LOG pbkdf2(sjcl, sha256, 200): 2888.5669999998063 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 240(30), key iteration count: 101, key size: 256(32), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 2353.168124999851 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 178.54275000002235 ms
> LOG pbkdf2(sjcl, sha256, 200): 2885.825124999974 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 240(30), key iteration count: 101, key size: 512(64), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 2355.261458999943 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 142.97600000025705 ms
> LOG pbkdf2(sjcl, sha256, 200): 5778.292417000048 ms
> LOG ----------------
> LOG saltLength: 512(64), password length: 240(30), key iteration count: 101, key size: 256(32), digest method: SHA-256
> LOG pbkdf2(quick, 20000): 2418.67799999984 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 320.01712500024587 ms
> LOG pbkdf2(sjcl, sha256, 200): 2906.953041999601 ms
> LOG ----------------
> LOG saltLength: 512(64), password length: 240(30), key iteration count: 101, key size: 256(32), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 2353.4379170001484 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 321.5388340000063 ms
> LOG pbkdf2(sjcl, sha256, 200): 2905.0100420000963 ms
> LOG ----------------
> LOG saltLength: 512(64), password length: 240(30), key iteration count: 101, key size: 512(64), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 2355.878584000282 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 288.718499999959 ms
> LOG pbkdf2(sjcl, sha256, 200): 5795.772125000134 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 10001, key size: 256(32), digest method: SHA-256
> LOG pbkdf2(quick, 200): 1366.0289580002427 ms
> LOG pbkdf2(sjcl, sha256, cached, 200): 1418.0677499999292 ms
> LOG pbkdf2(sjcl, sha256, 2): 2846.321624999866 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 10001, key size: 256(32), digest method: SHA-512
> LOG pbkdf2(quick, 200): 1303.416334000416 ms
> LOG pbkdf2(sjcl, sha256, cached, 200): 1419.0715419999324 ms
> LOG pbkdf2(sjcl, sha256, 2): 2844.516832999885 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 10001, key size: 512(64), digest method: SHA-512
> LOG pbkdf2(quick, 200): 1303.4170419997536 ms
> LOG pbkdf2(sjcl, sha256, cached, 200): 1421.15870800009 ms
> LOG pbkdf2(sjcl, sha256, 2): 5686.07349999994 ms
> LOG --------encryption/decryption performance--------
> LOG plaintextLength: 2048(256), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 77.13537499960512 ms, 1659420.2076628949 bytes/s
> LOG encryption(sjcl, 25): 75.54125000024214 ms, 84721.9234521468 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 352
> LOG plaintextLength: 2048(256), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 79.6373330000788 ms, 1607286.371579939 bytes/s
> LOG decryption(sjcl, 25): 74.09804099984467 ms, 86372.05401980082 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 344
> LOG ----------------
> LOG plaintextLength: 2048(256), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 77.42075000004843 ms, 1653303.5394247659 bytes/s
> LOG encryption(sjcl, 25): 78.41687500011176 ms, 81615.08603844362 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 352
> LOG plaintextLength: 2048(256), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 78.54629199998453 ms, 1629612.2546437355 bytes/s
> LOG decryption(sjcl, 25): 79.12695800000802 ms, 80882.67465051988 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 344
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 379.47495900001377 ms, 33730815.95088738 bytes/s
> LOG encryption(sjcl, 25): 6632.241915999912 ms, 96498.28943302504 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 413.17129100020975 ms, 30979887.225498207 bytes/s
> LOG decryption(sjcl, 25): 6840.5000829999335 ms, 93560.4111153413 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 436.2204999998212 ms, 29342958.43502368 bytes/s
> LOG encryption(sjcl, 25): 6949.238999999594 ms, 92096.41516143529 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 438.9721249998547 ms, 29159026.89721867 bytes/s
> LOG decryption(sjcl, 25): 7006.8967500003055 ms, 91338.58009253128 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 48(6)
> LOG encryption(quick, 500): 417.6161249997094 ms, 30650157.486157667 bytes/s
> LOG encryption(sjcl, 25): 6743.384792000055 ms, 94907.8274102432 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 48(6)
> LOG decryption(quick, 500): 417.1638329997659 ms, 30683388.60528013 bytes/s
> LOG decryption(sjcl, 25): 6844.794207999483 ms, 93501.71539884058 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 442.29174999985844 ms, 28940173.539307702 bytes/s
> LOG encryption(sjcl, 25): 7053.357374999672 ms, 90736.9307939015 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 443.17712499946356 ms, 28882357.13884261 bytes/s
> LOG decryption(sjcl, 25): 7114.751958000474 ms, 89953.9441118992 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 128(16), adataLength: 0(0)
> LOG encryption(quick, 500): 422.30737499985844 ms, 30309676.68988563 bytes/s
> LOG encryption(sjcl, 25): 6852.387999999337 ms, 93398.09713052762 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34156
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 128(16), adataLength: 0(0)
> LOG decryption(quick, 500): 422.3282089997083 ms, 30308181.474112332 bytes/s
> LOG decryption(sjcl, 25): 6903.232417000458 ms, 92710.19159428623 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 443.69845800008625 ms, 28848421.19509352 bytes/s
> LOG encryption(sjcl, 25): 7056.834792000242 ms, 90692.21809266611 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 447.9832500005141 ms, 28572496.851132963 bytes/s
> LOG decryption(sjcl, 25): 7123.352874999866 ms, 89845.33143741135 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 128(16), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 426.2956670001149 ms, 30026108.616291776 bytes/s
> LOG encryption(sjcl, 25): 6893.698290999979 ms, 92838.41168905632 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 128(16), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 429.11837499961257 ms, 29828599.15987414 bytes/s
> LOG decryption(sjcl, 25): 6975.392459000461 ms, 91751.10988546569 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 128(16), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 449.6036250004545 ms, 28469521.34780288 bytes/s
> LOG encryption(sjcl, 25): 7081.416875000112 ms, 90377.39357774922 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 128(16), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 447.9061249997467 ms, 28577416.752242982 bytes/s
> LOG decryption(sjcl, 25): 7196.476666999981 ms, 88932.4081233767 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 5120000(640000), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 40): 705.0378749994561 ms, 36310106.035111584 bytes/s
> LOG encryption(sjcl, 2): 13861.268540999852 ms, 92343.64057040843 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 853344
> LOG plaintextLength: 5120000(640000), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 40): 697.6258340002969 ms, 36695888.75917274 bytes/s
> LOG decryption(sjcl, 2): 13938.027042000555 ms, 91835.09230846484 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 853336
> LOG ----------------
> LOG plaintextLength: 5120000(640000), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 40): 736.1617089994252 ms, 34774968.17213565 bytes/s
> LOG encryption(sjcl, 2): 14352.770541999489 ms, 89181.38809886407 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 853344
> LOG plaintextLength: 5120000(640000), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 40): 737.2392499996349 ms, 34724141.45070637 bytes/s
> LOG decryption(sjcl, 2): 14487.688291999511 ms, 88350.87932605854 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 853336
> LOG ----------------
> LOG plaintextLength: 10240000(1280000), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 40): 1473.2792500006035 ms, 34752406.918090396 bytes/s
> LOG encryption(sjcl, 2): 27935.867624999955 ms, 91638.46401208754 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 1706680
> LOG plaintextLength: 10240000(1280000), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 40): 1516.8110839994624 ms, 33755027.59710724 bytes/s
> LOG decryption(sjcl, 2): 28701.676749999635 ms, 89193.39529527775 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 1706668
> LOG ----------------
> LOG plaintextLength: 10240000(1280000), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 40): 1468.044166999869 ms, 34876334.88891112 bytes/s
> LOG encryption(sjcl, 2): 29685.971707999706 ms, 86236.01831804405 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 1706680
> LOG plaintextLength: 10240000(1280000), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 40): 1449.4471250008792 ms, 35323813.554060444 bytes/s
> LOG decryption(sjcl, 2): 30299.53395800013 ms, 84489.74837529047 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 1706668
> LOG --------base64 performance--------
> LOG dataLength: 2048(256)
> LOG encode(rnqc, 500): 38.77312500029802 ms, 3301255.7022168357 bytes/s
> LOG decode(rnqc, 500): 105.86000000033528 ms, 1209144.1526506196 bytes/s
> LOG encode(rnqb, 500): 37.137833000160754 ms, 3446620.054526228 bytes/s
> LOG decode(rnqb, 500): 29.444875000044703 ms, 4347106.245137929 bytes/s
> LOG encode(sjcl, 500): 57.38633400015533 ms, 2230496.2014066544 bytes/s
> LOG decode(sjcl, 500): 70.99154200032353 ms, 1803031.6907247438 bytes/s
> LOG dataLength: 204800(25600)
> LOG encode(rnqc, 500): 3675.7017500000075 ms, 3482328.238410522 bytes/s
> LOG decode(rnqc, 500): 10002.207958000712 ms, 1279717.4437631392 bytes/s
> LOG encode(rnqb, 500): 3733.5245000002906 ms, 3428395.876335887 bytes/s
> LOG decode(rnqb, 500): 2770.357874999754 ms, 4620341.695024198 bytes/s
> LOG encode(sjcl, 500): 5470.24479100015 ms, 2339931.847484967 bytes/s
> LOG decode(sjcl, 500): 7086.350624999963 ms, 1806289.3973722993 bytes/s
> LOG dataLength: 409600(51200)
> LOG encode(rnqc, 500): 7454.447457999922 ms, 3434191.4869259335 bytes/s
> LOG decode(rnqc, 500): 20178.53895800002 ms, 1268674.6078734596 bytes/s
> LOG encode(rnqb, 500): 7534.492624999955 ms, 3397707.221194626 bytes/s
> LOG decode(rnqb, 500): 5536.3391669997945 ms, 4623994.1643374665 bytes/s
> LOG encode(sjcl, 500): 11173.965625000186 ms, 2291039.802621513 bytes/s
> LOG decode(sjcl, 500): 14196.708499999717 ms, 1803234.883635211 bytes/s
> 
> ```

> **iOS emulator iOS 15.0**
>
> ```auto
> LOG --------pbkdf2 performance--------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 101, key size: 256(32), digest method: SHA-256
> LOG pbkdf2(quick, 20000): 2229.5543290376663 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 154.22447896003723 ms
> LOG pbkdf2(sjcl, sha256, 200): 2095.100650906563 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 101, key size: 256(32), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 2521.3089059591293 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 181.30959403514862 ms
> LOG pbkdf2(sjcl, sha256, 200): 2138.9532709121704 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 101, key size: 512(64), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 2643.7549740076065 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 155.4594680070877 ms
> LOG pbkdf2(sjcl, sha256, 200): 4248.223634958267 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 240(30), key iteration count: 101, key size: 256(32), digest method: SHA-256
> LOG pbkdf2(quick, 20000): 2613.257973909378 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 152.44213795661926 ms
> LOG pbkdf2(sjcl, sha256, 200): 2095.1263979673386 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 240(30), key iteration count: 101, key size: 256(32), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 2884.399686932564 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 179.50941908359528 ms
> LOG pbkdf2(sjcl, sha256, 200): 2103.7113379240036 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 240(30), key iteration count: 101, key size: 512(64), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 2882.619080066681 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 154.35484898090363 ms
> LOG pbkdf2(sjcl, sha256, 200): 4157.419281005859 ms
> LOG ----------------
> LOG saltLength: 512(64), password length: 240(30), key iteration count: 101, key size: 256(32), digest method: SHA-256
> LOG pbkdf2(quick, 20000): 2590.361116051674 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 258.1078579425812 ms
> LOG pbkdf2(sjcl, sha256, 200): 2103.0035790205 ms
> LOG ----------------
> LOG saltLength: 512(64), password length: 240(30), key iteration count: 101, key size: 256(32), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 2887.780350923538 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 288.13315999507904 ms
> LOG pbkdf2(sjcl, sha256, 200): 2102.3562890291214 ms
> LOG ----------------
> LOG saltLength: 512(64), password length: 240(30), key iteration count: 101, key size: 512(64), digest method: SHA-512
> LOG pbkdf2(quick, 20000): 2891.8577510118484 ms
> LOG pbkdf2(sjcl, sha256, cached, 20000): 255.81202399730682 ms
> LOG pbkdf2(sjcl, sha256, 200): 4186.927751898766 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 10001, key size: 256(32), digest method: SHA-256
> LOG pbkdf2(quick, 200): 1394.1217139959335 ms
> LOG pbkdf2(sjcl, sha256, cached, 200): 1030.356518983841 ms
> LOG pbkdf2(sjcl, sha256, 2): 2064.19722700119 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 10001, key size: 256(32), digest method: SHA-512
> LOG pbkdf2(quick, 200): 1681.1125310659409 ms
> LOG pbkdf2(sjcl, sha256, cached, 200): 1030.860221028328 ms
> LOG pbkdf2(sjcl, sha256, 2): 2058.9920060634613 ms
> LOG ----------------
> LOG saltLength: 256(32), password length: 80(10), key iteration count: 10001, key size: 512(64), digest method: SHA-512
> LOG pbkdf2(quick, 200): 1676.7209589481354 ms
> LOG pbkdf2(sjcl, sha256, cached, 200): 1029.0161039829254 ms
> LOG pbkdf2(sjcl, sha256, 2): 4105.468899965286 ms
> LOG --------encryption/decryption performance--------
> LOG plaintextLength: 2048(256), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 74.41604602336884 ms, 1720059.1383181554 bytes/s
> LOG encryption(sjcl, 25): 59.168903946876526 ms, 108164.92402404643 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 352
> LOG plaintextLength: 2048(256), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 71.93951499462128 ms, 1779272.490363192 bytes/s
> LOG decryption(sjcl, 25): 62.419222950935364 ms, 102532.51638570895 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 344
> LOG ----------------
> LOG plaintextLength: 2048(256), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 70.72732996940613 ms, 1809767.172822271 bytes/s
> LOG encryption(sjcl, 25): 61.33375000953674 ms, 104347.11719085932 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 352
> LOG plaintextLength: 2048(256), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 75.36046707630157 ms, 1698503.2732135474 bytes/s
> LOG decryption(sjcl, 25): 60.761638045310974 ms, 105329.6159532008 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 344
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 387.40737998485565 ms, 33040155.302411564 bytes/s
> LOG encryption(sjcl, 25): 5326.46110200882 ms, 120154.82470314683 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 389.7121869325638 ms, 32844751.663398523 bytes/s
> LOG decryption(sjcl, 25): 5432.152951002121 ms, 117817.00658519438 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 401.1115839481354 ms, 31911319.72308002 bytes/s
> LOG encryption(sjcl, 25): 5462.175951004028 ms, 117169.42217549008 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 400.61005198955536 ms, 31951270.16017491 bytes/s
> LOG decryption(sjcl, 25): 5520.619140028954 ms, 115929.0260325119 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 48(6)
> LOG encryption(quick, 500): 384.8009070158005 ms, 33263954.857243653 bytes/s
> LOG encryption(sjcl, 25): 5299.915349960327 ms, 120756.6456707258 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 48(6)
> LOG decryption(quick, 500): 388.6654371023178 ms, 32933208.816893965 bytes/s
> LOG decryption(sjcl, 25): 5364.411003112793 ms, 119304.80338449623 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 398.6457870006561 ms, 32108705.064476028 bytes/s
> LOG encryption(sjcl, 25): 5479.58407998085 ms, 116797.18581893475 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 408.01642298698425 ms, 31371286.249446683 bytes/s
> LOG decryption(sjcl, 25): 5482.023701071739 ms, 116745.20850299855 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 128(16), adataLength: 0(0)
> LOG encryption(quick, 500): 384.18723595142365 ms, 33317088.13360583 bytes/s
> LOG encryption(sjcl, 25): 5390.5080589056015 ms, 118727.21328051123 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34156
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 96(12), authTagLength: 128(16), adataLength: 0(0)
> LOG decryption(quick, 500): 388.5096310377121 ms, 32946416.195168972 bytes/s
> LOG decryption(sjcl, 25): 5367.304774045944 ms, 119240.48045394666 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 400.2133240699768 ms, 31982943.170982324 bytes/s
> LOG encryption(sjcl, 25): 5484.317499041557 ms, 116696.38019896674 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 406.8734860420227 ms, 31459410.453395803 bytes/s
> LOG decryption(sjcl, 25): 5488.824814915657 ms, 116600.55140780339 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 128(16), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 389.29173600673676 ms, 32880225.332547244 bytes/s
> LOG encryption(sjcl, 25): 5488.520583033562 ms, 116607.01464405649 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 128(16), ivLength: 128(16), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 408.6426969766617 ms, 31323207.522612426 bytes/s
> LOG decryption(sjcl, 25): 5406.375777006149 ms, 118378.7487954469 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 128(16), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 500): 403.4316680431366 ms, 31727801.79128469 bytes/s
> LOG encryption(sjcl, 25): 5494.544220089912 ms, 116479.17904818083 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 34144
> LOG plaintextLength: 204800(25600), keyLength: 256(32), ivLength: 128(16), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 500): 406.17938899993896 ms, 31513169.665046502 bytes/s
> LOG decryption(sjcl, 25): 5610.075559973717 ms, 114080.45990792295 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 34136
> LOG ----------------
> LOG plaintextLength: 5120000(640000), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 40): 645.8212850093842 ms, 39639449.16994803 bytes/s
> LOG encryption(sjcl, 2): 10712.95495390892 ms, 119481.50678379883 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 853344
> LOG plaintextLength: 5120000(640000), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 40): 647.1380679607391 ms, 39558791.65117066 bytes/s
> LOG decryption(sjcl, 2): 10850.098103046417 ms, 117971.28356292099 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 853336
> LOG ----------------
> LOG plaintextLength: 5120000(640000), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 40): 675.3523789644241 ms, 37906137.29569544 bytes/s
> LOG encryption(sjcl, 2): 10935.877921938896 ms, 117045.92984090847 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 853344
> LOG plaintextLength: 5120000(640000), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 40): 684.6704640388489 ms, 37390250.265779585 bytes/s
> LOG decryption(sjcl, 2): 10999.26428604126 ms, 116371.4196434391 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 853336
> LOG ----------------
> LOG plaintextLength: 10240000(1280000), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 40): 1302.0398570299149 ms, 39322912.984240286 bytes/s
> LOG encryption(sjcl, 2): 21486.99620091915 ms, 119141.82773907181 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 1706680
> LOG plaintextLength: 10240000(1280000), keyLength: 128(16), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 40): 1283.0066471099854 ms, 39906262.46195192 bytes/s
> LOG decryption(sjcl, 2): 21700.048252940178 ms, 117972.08790322118 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 1706668
> LOG ----------------
> LOG plaintextLength: 10240000(1280000), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG encryption(quick, 40): 1363.9068559408188 ms, 37539220.34850569 bytes/s
> LOG encryption(sjcl, 2): 21740.797860980034 ms, 117750.96831173058 bytes/s
> LOG IsEncryptionResultMatching: true, ResultBase64Len: 1706680
> LOG plaintextLength: 10240000(1280000), keyLength: 256(32), ivLength: 96(12), authTagLength: 64(8), adataLength: 0(0)
> LOG decryption(quick, 40): 1362.8590570688248 ms, 37568081.405364566 bytes/s
> LOG decryption(sjcl, 2): 21976.352021932602 ms, 116488.85117261938 bytes/s
> LOG IsDecryptionResultMatching: true, ResultBase64Len: 1706668
> LOG --------base64 performance--------
> LOG dataLength: 2048(256)
> LOG encode(rnqc, 500): 36.54590594768524 ms, 3502444.3006893722 bytes/s
> LOG decode(rnqc, 500): 108.15013599395752 ms, 1183539.8894658026 bytes/s
> LOG encode(rnqb, 500): 35.82038903236389 ms, 3573383.8592414893 bytes/s
> LOG decode(rnqb, 500): 27.007463097572327 ms, 4739430.709858335 bytes/s
> LOG encode(sjcl, 500): 46.42895007133484 ms, 2756900.593343958 bytes/s
> LOG decode(sjcl, 500): 79.61913394927979 ms, 1607653.7592275313 bytes/s
> LOG dataLength: 204800(25600)
> LOG encode(rnqc, 500): 3305.665995955467 ms, 3872139.537285677 bytes/s
> LOG decode(rnqc, 500): 9660.69049191475 ms, 1324957.0525743072 bytes/s
> LOG encode(rnqb, 500): 3292.4907199144363 ms, 3887634.3439876544 bytes/s
> LOG decode(rnqb, 500): 2653.408005952835 ms, 4823984.841865108 bytes/s
> LOG encode(sjcl, 500): 4328.987990021706 ms, 2956811.1599071035 bytes/s
> LOG decode(sjcl, 500): 7536.448175907135 ms, 1698412.793564962 bytes/s
> LOG dataLength: 409600(51200)
> LOG encode(rnqc, 500): 6656.654829978943 ms, 3845775.491423668 bytes/s
> LOG decode(rnqc, 500): 19459.44050204754 ms, 1315556.8371714668 bytes/s
> LOG encode(rnqb, 500): 6668.660177111626 ms, 3838852.081241909 bytes/s
> LOG decode(rnqb, 500): 5324.269846081734 ms, 4808171.024396837 bytes/s
> LOG encode(sjcl, 500): 8809.960978984833 ms, 2905801.7465759395 bytes/s
> LOG decode(sjcl, 500): 15135.883440971375 ms, 1691344.9485679357 bytes/s
> 
> ```

---

<div class="post-metadata">

**Author:** ![wh201906](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/wh201906/32/14835_2.png) [@wh201906](https://discourse.joplinapp.org/u/wh201906)\
**Post date:** [16 June 2024 18:42 UTC](https://discourse.joplinapp.org/t/performance-test-of-react-native-quick-crypto/38622/4 "2024-06-16T18:42:01Z")

</div>

# Payloads

## PBKDF2

> **react-native-quick-crypto**
>
> ```typescript
> const startTime_quick = performance.now();
> for (let i = 0; i < iterationCount; i++) {
> let key = QuickCrypto.pbkdf2Sync(password, saltBuffer, keyIter, keySizeInBytes, digestName);
> }
> const endTime_quick = performance.now();
> console.log(`pbkdf2(quick, ${iterationCount}): ${endTime_quick - startTime_quick} ms`);
> 
> ```

> **sjcl, cachedPbkdf2()**
>
> ```typescript
> const startTime_sjcl_cached = performance.now();
> for (let i = 0; i < iterationCount; i++) {
> sjcl.misc.cachedPbkdf2(password, { salt: saltBitArray, iter: keyIter });
> }
> const endTime_sjcl_cached = performance.now();
> console.log(`pbkdf2(sjcl, sha256, cached, ${iterationCount}): ${endTime_sjcl_cached - startTime_sjcl_cached} ms`);
> 
> ```

> **sjcl, pbkdf2()**
>
> ```typescript
> iterationCount /= 100; // !!!!! count changed !!!!!
> const startTime_sjcl = performance.now();
> for (let i = 0; i < iterationCount; i++) {
> sjcl.misc.pbkdf2(password, saltBitArray, keyIter, keySizeInBits);
> }
> const endTime_sjcl = performance.now();
> console.log(`pbkdf2(sjcl, sha256, ${iterationCount}): ${endTime_sjcl - startTime_sjcl} ms`);
> 
> ```

## Encryption

> **react-native-quick-crypto**
>
> ```typescript
> const startTime_quick = performance.now();
> for (let i = 0; i < iterationCount; i++) {
> cipher_quick = null;
> encryptedPart_quick = null;
> authTag_quick = null;
> encryptedData_quick = null;
> 
> cipher_quick = QuickCrypto.createCipheriv(`aes-${keyLength}-gcm` as CipherGCMTypes, key, iv, gcmOption) as CipherGCM;
> cipher_quick.setAAD(adata, aadOption);
> encryptedPart_quick = cipher_quick.update(plaintext);
> cipher_quick.final();
> authTag_quick = cipher_quick.getAuthTag();
> // encryptedData_quick = Buffer.concat([encryptedPart_quick as Buffer, authTag_quick as Buffer]).toString('base64'); // this could be very slow
> }
> const endTime_quick = performance.now();
> const duration_quick = endTime_quick - startTime_quick;
> console.log(`encryption(quick, ${iterationCount}): ${duration_quick} ms, ${1000.0 * plaintext.byteLength * iterationCount / duration_quick} bytes/s`);
> 
> ```

> **sjcl**
>
> ```typescript
> iterationCount /= 20; // !!!!! count changed !!!!!
> const startTime_sjcl = performance.now();
> for (let i = 0; i < iterationCount; i++) {
> cipher_sjcl = null;
> encryptedData_sjcl = null;
> 
> cipher_sjcl = new sjcl.cipher.aes(keyBitArray);
> encryptedData_sjcl = sjcl.mode.gcm.encrypt(cipher_sjcl, plaintextBitArray, ivBitArray, adataBitArray, authTagLength);
> }
> const endTime_sjcl = performance.now();
> const duration_sjcl = endTime_sjcl - startTime_sjcl;
> console.log(`encryption(sjcl, ${iterationCount}): ${duration_sjcl} ms, ${1000.0 * plaintext.byteLength * iterationCount / duration_sjcl} bytes/s`);
> 
> ```

## Decryption

> **react-native-quick-crypto**
>
> ```typescript
> const startTime_quick = performance.now();
> for (let i = 0; i < iterationCount; i++) {
> authTag_quick2 = null;
> encryptedPart_quick2 = null;
> decipher_quick = null;
> decryptedData_quick = null;
> 
> authTag_quick2 = encryptedData_quick.subarray(-authTagLength / 8);
> encryptedPart_quick2 = encryptedData_quick.subarray(0, encryptedData_quick.length - authTag_quick2.length);
> decipher_quick = QuickCrypto.createDecipheriv(`aes-${keyLength}-gcm` as CipherGCMTypes, key, iv, gcmOption) as DecipherGCM;
> decipher_quick.setAuthTag(authTag_quick2);
> decipher_quick.setAAD(adata, aadOption);
> decryptedData_quick = decipher_quick.update(encryptedPart_quick2);
> try {
> decipher_quick.final();
> } catch (err) {
> throw new Error('Authentication failed! ' + err);
> }
> }
> const endTime_quick = performance.now();
> const duration_quick = endTime_quick - startTime_quick;
> console.log(`decryption(quick, ${iterationCount}): ${duration_quick} ms, ${1000.0 * plaintext.byteLength * iterationCount / duration_quick} bytes/s`);
> 
> ```

> **sjcl**
>
> ```typescript
> iterationCount /= 20; // !!!!! count changed !!!!!
> const startTime_sjcl = performance.now();
> for (let i = 0; i < iterationCount; i++) {
> decipher_sjcl = null;
> decryptedData_sjcl = null;
> 
> decipher_sjcl = new sjcl.cipher.aes(keyBitArray);
> decryptedData_sjcl = sjcl.mode.gcm.decrypt(decipher_sjcl, encryptedData_sjcl, ivBitArray, adataBitArray, authTagLength);
> }
> const endTime_sjcl = performance.now();
> const duration_sjcl = endTime_sjcl - startTime_sjcl;
> console.log(`decryption(sjcl, ${iterationCount}): ${duration_sjcl} ms, ${1000.0 * plaintext.byteLength * iterationCount / duration_sjcl} bytes/s`);
> 
> ```

## Base64

> **react-native-quick-crypto(@craftzdog/react-native-buffer?)**
>
> ```typescript
> let startTime_rnqc = performance.now();
> for (let i = 0; i < iterationCount; i++) {
> base64String = null;
> 
> base64String = rawData.toString("base64");
> }
> let endTime_rnqc = performance.now();
> let duration_rnqc = endTime_rnqc - startTime_rnqc;
> console.log(`encode(rnqc, ${iterationCount}): ${duration_rnqc} ms, ${1000.0 * rawData.byteLength * iterationCount / duration_rnqc} bytes/s`);
> 
> startTime_rnqc = performance.now();
> for (let i = 0; i < iterationCount; i++) {
> rawData = null;
> 
> rawData = Buffer.from(base64String as string, "base64");
> }
> endTime_rnqc = performance.now();
> duration_rnqc = endTime_rnqc - startTime_rnqc;
> console.log(`decode(rnqc, ${iterationCount}): ${duration_rnqc} ms, ${1000.0 * rawData.byteLength * iterationCount / duration_rnqc} bytes/s`);
> 
> ```

> **react-native-quick-base64**
>
> ```typescript
> let startTime_rnqb = performance.now();
> for (let i = 0; i < iterationCount; i++) {
> base64String = null;
> 
> base64String = fromByteArray(rawData);
> }
> let endTime_rnqb = performance.now();
> let duration_rnqb = endTime_rnqb - startTime_rnqb;
> console.log(`encode(rnqb, ${iterationCount}): ${duration_rnqb} ms, ${1000.0 * rawData.byteLength * iterationCount / duration_rnqb} bytes/s`);
> 
> startTime_rnqb = performance.now();
> for (let i = 0; i < iterationCount; i++) {
> rawData = null;
> 
> rawData = toByteArray(base64String as string);
> }
> endTime_rnqb = performance.now();
> duration_rnqb = endTime_rnqb - startTime_rnqb;
> console.log(`decode(rnqb, ${iterationCount}): ${duration_rnqb} ms, ${1000.0 * rawData.byteLength * iterationCount / duration_rnqb} bytes/s`);
> 
> ```

> **sjcl**
>
> ```typescript
> let startTime_sjcl = performance.now();
> for (let i = 0; i < iterationCount; i++) {
> base64String = null;
> 
> base64String = sjcl.codec.base64.fromBits(rawDataBitArray_sjcl);
> }
> let endTime_sjcl = performance.now();
> let duration_sjcl = endTime_sjcl - startTime_sjcl;
> console.log(`encode(sjcl, ${iterationCount}): ${duration_sjcl} ms, ${1000.0 * rawData.byteLength * iterationCount / duration_sjcl} bytes/s`);
> 
> startTime_sjcl = performance.now();
> for (let i = 0; i < iterationCount; i++) {
> rawDataBitArray_sjcl = null;
> 
> rawDataBitArray_sjcl = sjcl.codec.base64.toBits(base64String as string);
> }
> endTime_sjcl = performance.now();
> duration_sjcl = endTime_sjcl - startTime_sjcl;
> console.log(`decode(sjcl, ${iterationCount}): ${duration_sjcl} ms, ${1000.0 * rawData.byteLength * iterationCount / duration_sjcl} bytes/s`);
> 
> ```

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [16 June 2024 18:48 UTC](https://discourse.joplinapp.org/t/performance-test-of-react-native-quick-crypto/38622/5 "2024-06-16T18:48:27Z")

</div>

> [@wh201906](#):
>
> - The parameters of encryption/decryption don't affect the speed a lot. The bottleneck is the speed of base64 encoding/decoding after switching to the native encryption library.

Is base64 encoding/decoding really necessary? Is it possible by any chance to read and write the binary data directly? (especially for resources)

> I will post the raw test results below.

Any chance you could present the results in a more readable format? Maybe using graphs (could be done with Mermaid) or with a table showing the relevant numbers only

---

<div class="post-metadata">

**Author:** ![wh201906](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/wh201906/32/14835_2.png) [@wh201906](https://discourse.joplinapp.org/u/wh201906)\
**Post date:** [16 June 2024 18:54 UTC](https://discourse.joplinapp.org/t/performance-test-of-react-native-quick-crypto/38622/6 "2024-06-16T18:54:40Z")

</div>

> [@laurent](#):
>
> Is base64 encoding/decoding really necessary? Is it possible by any chance to read and write the binary data directly? (especially for resources)

I need some time to evaluate the feasibility of that. Personally I'd like to wait for the Bridgeless Mode of React Native becoming compatible to all libraries.

> [@laurent](#):
>
> Any chance you could present the results in a more readable format?

I will, but I need some time for that.

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [16 June 2024 19:04 UTC](https://discourse.joplinapp.org/t/performance-test-of-react-native-quick-crypto/38622/7 "2024-06-16T19:04:32Z")

</div>

> [@wh201906](#):
>
> I need some time to evaluate the feasibility of that. Personally I'd like to wait for the Bridgeless Mode of React Native becoming compatible to all libraries.

Fair enough, if using native crypto, even with base64 encoding, improves performance that's already a win. And indeed later on we could look at using binary mode

---

<div class="post-metadata">

**Author:** ![wh201906](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/wh201906/32/14835_2.png) [@wh201906](https://discourse.joplinapp.org/u/wh201906)\
**Post date:** [17 June 2024 17:54 UTC](https://discourse.joplinapp.org/t/performance-test-of-react-native-quick-crypto/38622/8 "2024-06-17T17:54:57Z")

</div>

We can also find a faster base64 implementation. The [`simdutf`](https://github.com/simdutf/simdutf) library looks really fascinating, but I haven't find a React Native wrapper for it.  
For your information, the base64 encoding/decoding of Node.js is very fast because it uses `simdutf`.
