@protontech/openpgp 4.10.6 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +311 -239
- package/dist/lightweight/bn.interface.min.mjs +3 -0
- package/dist/lightweight/bn.interface.min.mjs.map +1 -0
- package/dist/lightweight/bn.interface.mjs +340 -0
- package/dist/lightweight/bn.min.mjs +3 -0
- package/dist/lightweight/bn.min.mjs.map +1 -0
- package/dist/lightweight/bn.mjs +3434 -0
- package/dist/lightweight/elliptic.min.mjs +3 -0
- package/dist/lightweight/elliptic.min.mjs.map +1 -0
- package/dist/lightweight/elliptic.mjs +4313 -0
- package/dist/lightweight/openpgp.min.mjs +3 -0
- package/dist/lightweight/openpgp.min.mjs.map +1 -0
- package/dist/lightweight/openpgp.mjs +31379 -0
- package/dist/lightweight/ponyfill.es6.min.mjs +3 -0
- package/dist/lightweight/ponyfill.es6.min.mjs.map +1 -0
- package/dist/lightweight/ponyfill.es6.mjs +3831 -0
- package/dist/lightweight/web-streams-adapter.min.mjs +17 -0
- package/dist/lightweight/web-streams-adapter.min.mjs.map +1 -0
- package/dist/lightweight/web-streams-adapter.mjs +561 -0
- package/dist/node/openpgp.js +43947 -0
- package/dist/node/openpgp.min.js +17 -0
- package/dist/node/openpgp.min.js.map +1 -0
- package/dist/node/openpgp.min.mjs +17 -0
- package/dist/node/openpgp.min.mjs.map +1 -0
- package/dist/node/openpgp.mjs +43884 -0
- package/dist/openpgp.js +41082 -41563
- package/dist/openpgp.min.js +17 -2
- package/dist/openpgp.min.js.map +1 -0
- package/dist/openpgp.min.mjs +17 -0
- package/dist/openpgp.min.mjs.map +1 -0
- package/dist/openpgp.mjs +43872 -0
- package/lightweight/package.json +5 -0
- package/openpgp.d.ts +890 -0
- package/package.json +63 -57
- package/dist/compat/openpgp.js +0 -61067
- package/dist/compat/openpgp.min.js +0 -2
- package/dist/compat/openpgp.worker.js +0 -173
- package/dist/compat/openpgp.worker.min.js +0 -2
- package/dist/lightweight/elliptic.min.js +0 -5
- package/dist/lightweight/openpgp.js +0 -40024
- package/dist/lightweight/openpgp.min.js +0 -2
- package/dist/lightweight/openpgp.worker.js +0 -173
- package/dist/lightweight/openpgp.worker.min.js +0 -2
- package/dist/openpgp.worker.js +0 -173
- package/dist/openpgp.worker.min.js +0 -2
- package/src/cleartext.js +0 -220
- package/src/config/config.js +0 -224
- package/src/config/index.js +0 -7
- package/src/config/localStorage.js +0 -35
- package/src/crypto/aes_kw.js +0 -153
- package/src/crypto/cfb.js +0 -169
- package/src/crypto/cipher/aes.js +0 -27
- package/src/crypto/cipher/blowfish.js +0 -398
- package/src/crypto/cipher/cast5.js +0 -610
- package/src/crypto/cipher/des.js +0 -476
- package/src/crypto/cipher/index.js +0 -91
- package/src/crypto/cipher/twofish.js +0 -346
- package/src/crypto/cmac.js +0 -98
- package/src/crypto/crypto.js +0 -394
- package/src/crypto/eax.js +0 -172
- package/src/crypto/gcm.js +0 -141
- package/src/crypto/hash/index.js +0 -163
- package/src/crypto/hash/md5.js +0 -205
- package/src/crypto/index.js +0 -57
- package/src/crypto/ocb.js +0 -274
- package/src/crypto/pkcs1.js +0 -170
- package/src/crypto/pkcs5.js +0 -55
- package/src/crypto/public_key/dsa.js +0 -188
- package/src/crypto/public_key/elgamal.js +0 -137
- package/src/crypto/public_key/elliptic/curves.js +0 -385
- package/src/crypto/public_key/elliptic/ecdh.js +0 -414
- package/src/crypto/public_key/elliptic/ecdsa.js +0 -348
- package/src/crypto/public_key/elliptic/eddsa.js +0 -119
- package/src/crypto/public_key/elliptic/index.js +0 -34
- package/src/crypto/public_key/elliptic/indutnyKey.js +0 -85
- package/src/crypto/public_key/index.js +0 -28
- package/src/crypto/public_key/prime.js +0 -275
- package/src/crypto/public_key/rsa.js +0 -597
- package/src/crypto/random.js +0 -145
- package/src/crypto/signature.js +0 -137
- package/src/encoding/armor.js +0 -433
- package/src/encoding/base64.js +0 -96
- package/src/enums.js +0 -493
- package/src/hkp.js +0 -89
- package/src/index.js +0 -161
- package/src/key/factory.js +0 -326
- package/src/key/helper.js +0 -363
- package/src/key/index.js +0 -32
- package/src/key/key.js +0 -890
- package/src/key/subkey.js +0 -187
- package/src/key/user.js +0 -230
- package/src/keyring/index.js +0 -12
- package/src/keyring/keyring.js +0 -229
- package/src/keyring/localstore.js +0 -119
- package/src/lightweight_helper.js +0 -26
- package/src/message.js +0 -825
- package/src/openpgp.js +0 -717
- package/src/packet/all_packets.js +0 -116
- package/src/packet/clone.js +0 -189
- package/src/packet/compressed.js +0 -194
- package/src/packet/index.js +0 -20
- package/src/packet/literal.js +0 -168
- package/src/packet/marker.js +0 -62
- package/src/packet/one_pass_signature.js +0 -156
- package/src/packet/packet.js +0 -300
- package/src/packet/packetlist.js +0 -232
- package/src/packet/public_key.js +0 -280
- package/src/packet/public_key_encrypted_session_key.js +0 -156
- package/src/packet/public_subkey.js +0 -44
- package/src/packet/secret_key.js +0 -448
- package/src/packet/secret_subkey.js +0 -41
- package/src/packet/signature.js +0 -782
- package/src/packet/sym_encrypted_aead_protected.js +0 -189
- package/src/packet/sym_encrypted_integrity_protected.js +0 -139
- package/src/packet/sym_encrypted_session_key.js +0 -204
- package/src/packet/symmetrically_encrypted.js +0 -118
- package/src/packet/trust.js +0 -35
- package/src/packet/user_attribute.js +0 -94
- package/src/packet/userid.js +0 -87
- package/src/polyfills.js +0 -64
- package/src/signature.js +0 -73
- package/src/type/ecdh_symkey.js +0 -69
- package/src/type/kdf_params.js +0 -114
- package/src/type/keyid.js +0 -110
- package/src/type/mpi.js +0 -138
- package/src/type/oid.js +0 -110
- package/src/type/s2k.js +0 -203
- package/src/util.js +0 -836
- package/src/wkd.js +0 -88
- package/src/worker/async_proxy.js +0 -190
- package/src/worker/worker.js +0 -167
- package/test/crypto/aes_kw.js +0 -57
- package/test/crypto/cipher/aes.js +0 -86
- package/test/crypto/cipher/blowfish.js +0 -58
- package/test/crypto/cipher/cast5.js +0 -25
- package/test/crypto/cipher/des.js +0 -143
- package/test/crypto/cipher/index.js +0 -7
- package/test/crypto/cipher/twofish.js +0 -71
- package/test/crypto/crypto.js +0 -383
- package/test/crypto/eax.js +0 -150
- package/test/crypto/ecdh.js +0 -359
- package/test/crypto/elliptic.js +0 -251
- package/test/crypto/elliptic_data.js +0 -102
- package/test/crypto/hash/index.js +0 -5
- package/test/crypto/hash/md5.js +0 -16
- package/test/crypto/hash/ripemd.js +0 -14
- package/test/crypto/hash/sha.js +0 -20
- package/test/crypto/index.js +0 -14
- package/test/crypto/ocb.js +0 -183
- package/test/crypto/pkcs5.js +0 -39
- package/test/crypto/random.js +0 -79
- package/test/crypto/rsa.js +0 -180
- package/test/crypto/validate.js +0 -387
- package/test/general/armor.js +0 -408
- package/test/general/brainpool.js +0 -360
- package/test/general/decompression.js +0 -60
- package/test/general/ecc_nist.js +0 -115
- package/test/general/ecc_secp256k1.js +0 -242
- package/test/general/forwarding.js +0 -43
- package/test/general/hkp.js +0 -165
- package/test/general/index.js +0 -20
- package/test/general/key.js +0 -3402
- package/test/general/keyring.js +0 -336
- package/test/general/oid.js +0 -39
- package/test/general/openpgp.js +0 -2542
- package/test/general/packet.js +0 -937
- package/test/general/signature.js +0 -1665
- package/test/general/streaming.js +0 -944
- package/test/general/testInputs.js +0 -18
- package/test/general/util.js +0 -183
- package/test/general/wkd.js +0 -48
- package/test/general/x25519.js +0 -556
- package/test/unittests.js +0 -64
|
@@ -1,360 +0,0 @@
|
|
|
1
|
-
/* globals tryTests: true */
|
|
2
|
-
|
|
3
|
-
const openpgp = typeof window !== 'undefined' && window.openpgp ? window.openpgp : require('../../dist/openpgp');
|
|
4
|
-
|
|
5
|
-
const chai = require('chai');
|
|
6
|
-
chai.use(require('chai-as-promised'));
|
|
7
|
-
const input = require('./testInputs.js');
|
|
8
|
-
|
|
9
|
-
const expect = chai.expect;
|
|
10
|
-
|
|
11
|
-
(openpgp.config.ci ? describe.skip : describe)('Brainpool Cryptography @lightweight', function () {
|
|
12
|
-
//only x25519 crypto is fully functional in lightbuild
|
|
13
|
-
if (!openpgp.config.use_indutny_elliptic && !openpgp.util.getNodeCrypto()) {
|
|
14
|
-
before(function() {
|
|
15
|
-
this.skip();
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
const data = {
|
|
19
|
-
romeo: {
|
|
20
|
-
id: 'fa3d64c9bcf338bc',
|
|
21
|
-
pass: '321',
|
|
22
|
-
pub: [
|
|
23
|
-
'-----BEGIN PGP PUBLIC KEY BLOCK-----',
|
|
24
|
-
'',
|
|
25
|
-
'mHMEWq8ruRMJKyQDAwIIAQELAwMEhi/66JLo1vMhpytb1bYvBhd/aKHde2Zwke7r',
|
|
26
|
-
'zWFTYBZQl/DUrpMrVAhkQhk5G3kqFWf98O/DpvVmY6EDr3IjmODWowNvGfC4Avc9',
|
|
27
|
-
'rYRgV8GbMBUVLIS+ytS1YNpAKW4vtBlidW5ueSA8YnVubnlAYnVubnkuYnVubnk+',
|
|
28
|
-
'iLAEExMKADgWIQSLliWLcmzBLxv2/X36PWTJvPM4vAUCWq8ruQIbAwULCQgHAwUV',
|
|
29
|
-
'CgkICwUWAgMBAAIeAQIXgAAKCRD6PWTJvPM4vIcVAYCIO41QylZkb9W4FP+kd3bz',
|
|
30
|
-
'b73xxwojWpCiw1bWV9Xe/dKA23DtCYhlmhF/Twjh9lkBfihHXs/negGMnqbA8TQF',
|
|
31
|
-
'U1IvBflDcA7yj677lgLkze/yd5hg/ZVx7M8XyUzcEm9xi7h3BFqvK7kSCSskAwMC',
|
|
32
|
-
'CAEBCwMDBCkGskA01sBvG/B1bl0EN+yxF6xPn74WQoAMm7K4n1PlZ1u8RWg+BJVG',
|
|
33
|
-
'Kna/88ZGcT5BZSUvRrYWgqb4/SPAPea5C1p6UYd+C0C0dVf0FaGv5z0gCtc/+kwF',
|
|
34
|
-
'3sLGLZh3rAMBCQmImAQYEwoAIBYhBIuWJYtybMEvG/b9ffo9ZMm88zi8BQJaryu5',
|
|
35
|
-
'AhsMAAoJEPo9ZMm88zi8w1QBfR4k1d5ElME3ef7viE+Mud4qGv1ra56pKa86hS9+',
|
|
36
|
-
'l262twTxe1hk08/FySeJW08P3wF/WrhCrE9UDD6FQiZk1lqekhd9bf84v6i5Smbi',
|
|
37
|
-
'oml1QWkiI6BtbLD39Su6zQKR7u+Y',
|
|
38
|
-
'=wB7z',
|
|
39
|
-
'-----END PGP PUBLIC KEY BLOCK-----'
|
|
40
|
-
].join('\n'),
|
|
41
|
-
priv: [
|
|
42
|
-
'-----BEGIN PGP PRIVATE KEY BLOCK-----',
|
|
43
|
-
'',
|
|
44
|
-
'lNYEWq8ruRMJKyQDAwIIAQELAwMEhi/66JLo1vMhpytb1bYvBhd/aKHde2Zwke7r',
|
|
45
|
-
'zWFTYBZQl/DUrpMrVAhkQhk5G3kqFWf98O/DpvVmY6EDr3IjmODWowNvGfC4Avc9',
|
|
46
|
-
'rYRgV8GbMBUVLIS+ytS1YNpAKW4v/gcDAtyjmSfDquSq5ffphtkwJ56Zz5jc+jSm',
|
|
47
|
-
'yZaPgmnPOwcgYhWy1g7BcBKYFPNKZlajnV4Rut2VUWkELwWrRmchX4ENJoAKZob0',
|
|
48
|
-
'l/zjgOPug3FtEGirOPmvi7nOkjDEFNJwtBlidW5ueSA8YnVubnlAYnVubnkuYnVu',
|
|
49
|
-
'bnk+iLAEExMKADgWIQSLliWLcmzBLxv2/X36PWTJvPM4vAUCWq8ruQIbAwULCQgH',
|
|
50
|
-
'AwUVCgkICwUWAgMBAAIeAQIXgAAKCRD6PWTJvPM4vIcVAYCIO41QylZkb9W4FP+k',
|
|
51
|
-
'd3bzb73xxwojWpCiw1bWV9Xe/dKA23DtCYhlmhF/Twjh9lkBfihHXs/negGMnqbA',
|
|
52
|
-
'8TQFU1IvBflDcA7yj677lgLkze/yd5hg/ZVx7M8XyUzcEm9xi5zaBFqvK7kSCSsk',
|
|
53
|
-
'AwMCCAEBCwMDBCkGskA01sBvG/B1bl0EN+yxF6xPn74WQoAMm7K4n1PlZ1u8RWg+',
|
|
54
|
-
'BJVGKna/88ZGcT5BZSUvRrYWgqb4/SPAPea5C1p6UYd+C0C0dVf0FaGv5z0gCtc/',
|
|
55
|
-
'+kwF3sLGLZh3rAMBCQn+BwMC6RvzFHWyKqPlVqrm6+j797Y9vHdZW1zixtmEK0Wg',
|
|
56
|
-
'lvQRpZF8AbpSzk/XolsoeQyic1e18C6ubFZFw7cI7ekINiRu/OXOvBnTbc5TdbDi',
|
|
57
|
-
'kKTuOkL+lEwWrUTEwdshbJ+ImAQYEwoAIBYhBIuWJYtybMEvG/b9ffo9ZMm88zi8',
|
|
58
|
-
'BQJaryu5AhsMAAoJEPo9ZMm88zi8w1QBfR4k1d5ElME3ef7viE+Mud4qGv1ra56p',
|
|
59
|
-
'Ka86hS9+l262twTxe1hk08/FySeJW08P3wF/WrhCrE9UDD6FQiZk1lqekhd9bf84',
|
|
60
|
-
'v6i5Smbioml1QWkiI6BtbLD39Su6zQKR7u+Y',
|
|
61
|
-
'=uGZP',
|
|
62
|
-
'-----END PGP PRIVATE KEY BLOCK-----'
|
|
63
|
-
].join('\n'),
|
|
64
|
-
message: 'test message\n',
|
|
65
|
-
message_encrypted: [
|
|
66
|
-
'-----BEGIN PGP MESSAGE-----',
|
|
67
|
-
'',
|
|
68
|
-
'hJ4Dry/W2EFbOT4SAwMEiTrIh02fyvPytwIsd9iGDYPFlvFSQmIvz4YW08mKfWrl',
|
|
69
|
-
's4fEAQQBoBPL5k2sZa/sFfapQyyJHhLpv4FyHGY+7zagsv7B47RLbc4jGJhWFJyf',
|
|
70
|
-
'DvCFqJCLH/T9p9nb5qHRMHdSZbXipTymcm9AJvCymKpLQLQFqL7lejjW0lSrVaas',
|
|
71
|
-
'WhCVgYgmoOtgjipYlaGc9NLACAEzHA2B4T5PpTlfQOsp3KkKNkByughSyaRbgppw',
|
|
72
|
-
'M9xxM+Fy0fSvWozKdvn7C2EFMuDbcTRSp2yb8k+ICyGuXvVN2ahASzdtkn+S6+GW',
|
|
73
|
-
'OQUOpu+VxbOf8zICR0FwLkHjIOE6/eUrGX+QIqlej/OTtqBoik2OAbNuqLlFQXsC',
|
|
74
|
-
'Cfp08rB83eU9UIpMgx3hq6tuad7m8Qa8e+/9eLe+Oc67rhWqWcDIKXExmqpMX9Qv',
|
|
75
|
-
'tZa9Z9Eq1OfX2n8kR7BnPnWn9qlhg/63sgNT',
|
|
76
|
-
'=lNCW',
|
|
77
|
-
'-----END PGP MESSAGE-----'
|
|
78
|
-
].join('\n'),
|
|
79
|
-
message_with_leading_zero_in_hash: 'test message\n277',
|
|
80
|
-
message_encrypted_with_leading_zero_in_hash:
|
|
81
|
-
`-----BEGIN PGP MESSAGE-----
|
|
82
|
-
Version: OpenPGP.js v4.5.5
|
|
83
|
-
Comment: https://openpgpjs.org
|
|
84
|
-
|
|
85
|
-
wX4DSpmSuiUYN4MSAgMERlxfWMZgb9Xdu9v5mYq1TP2QZO9lLloIIO45tn/W
|
|
86
|
-
3Eg5DbJfGiBvR7QUXbFY1KiILiXXYxEm1x8i0qw793NlizAdHSiZmifeBJXX
|
|
87
|
-
4sV1NDOaIUXVs6Aes7rhV7G3jADlDVu2N50Ti+MdGHz8rWqYt1zSwBgBo4ag
|
|
88
|
-
i7YemCOYIHqpa+R6lId0+BOXKUFZYCTH8J7QSZYYkH06DFvt1LOPXJHuJrX9
|
|
89
|
-
E++ph0fvdrZVm9kpOFv3fnn/EeDOL4chvemC0dawTLhs0rg+bin9xhGjzpl+
|
|
90
|
-
tbIxp3v4WG6xt9fkNwDSVC7yYMj+LeYcF+ZG1Bw5pCdMoBnJtqKLAJbqP3Ph
|
|
91
|
-
TRELeagBcoQblRDF03XxrjpeCbLqZFwpFQqac9T2eqDRtvi2DA+JYCJdJorO
|
|
92
|
-
KnthADE6hYMCSZVS9Q1IGN3TjROB5rrB/N3xItPsXuc=
|
|
93
|
-
=A7qX
|
|
94
|
-
-----END PGP MESSAGE-----`,
|
|
95
|
-
message_encrypted_with_leading_zero_in_hash_signed_by_elliptic_with_old_implementation:
|
|
96
|
-
`-----BEGIN PGP MESSAGE-----
|
|
97
|
-
Version: OpenPGP.js v4.6.0
|
|
98
|
-
Comment: https://openpgpjs.org
|
|
99
|
-
|
|
100
|
-
wX4DSpmSuiUYN4MSAgMEdWwp5tYcxcyj3G36EkQ61Xx/gVzYbgh7U54sDsl9
|
|
101
|
-
NKyc9gqjtEn5OQzXJ7Uteb+ojZsRy4b5cWBNQPdXJci0kTC+s98RugN7vEHe
|
|
102
|
-
ulmNfwICTJ7SA4OSb0WEeACG6B1yUZmwWDcPxUfotFL3BCZGxN7SwBgBm2bQ
|
|
103
|
-
wzRBU3SZ8xtqSCwC50PhXXmtqlDmQqJ84oTsyikH8e6zEgI78QXTf1WK530K
|
|
104
|
-
0W/r+OqQufWu5ZKXK9AyeDyLc577P6/CnDcjjoJOsOZm5XMcSXlJWAvsH7KJ
|
|
105
|
-
X/ua3tHArWaOmBYTtbfeZc3NpI5ne/gin3Gsz0llbWKG2KF4Op2/nt+Vhqa9
|
|
106
|
-
tkYrARUF5n9K9+TEasU4z1k898YkS5cIzFyBSGMhGDzdj7t1K93EyOxXPc84
|
|
107
|
-
EJ4QcD/oQ6x1M/8X/iKQCtxZP8RnlrbH7ExkNON5s5g=
|
|
108
|
-
=KDoL
|
|
109
|
-
-----END PGP MESSAGE-----`,
|
|
110
|
-
message_with_leading_zero_in_hash_old_elliptic_implementation: 'test message\n199',
|
|
111
|
-
},
|
|
112
|
-
juliet: {
|
|
113
|
-
id: '37e16a986b8af99e',
|
|
114
|
-
pass: '123',
|
|
115
|
-
pub: [
|
|
116
|
-
'-----BEGIN PGP PUBLIC KEY BLOCK-----',
|
|
117
|
-
'',
|
|
118
|
-
'mFMEWq7fNxMJKyQDAwIIAQEHAgMESvoep0lgc4/HqO0snFMMlVM3Pv19ljC+Ko1k',
|
|
119
|
-
'MkCmJygQTpfxaEBvVm3ChJmkfgWOcgxa5BJUnCg/JaMKkJmr3rQZc3VubnkgPHN1',
|
|
120
|
-
'bm55QHN1bm55LnN1bm55PoiQBBMTCgA4FiEEItRnV1URxiv5gJu+N+FqmGuK+Z4F',
|
|
121
|
-
'Alqu3zcCGwMFCwkIBwMFFQoJCAsFFgIDAQACHgECF4AACgkQN+FqmGuK+Z511QD+',
|
|
122
|
-
'KZLNqlkXkGcoopGdeS9O4oS0mxhAzi++p9btkTZSE24BAJvgM4aR/mwrQB4/5O2f',
|
|
123
|
-
'uA+wEc4vF69fbPIWM/VltNDPuFcEWq7fNxIJKyQDAwIIAQEHAgMEPC4wYIRcxwz8',
|
|
124
|
-
'FVZxihCex/kU/n7n8iP91ZeAXMqx68c0oTwwYweZgf2QPSqwDea6YIcIrCfbHHeE',
|
|
125
|
-
'vtzzyrZllgMBCAeIeAQYEwoAIBYhBCLUZ1dVEcYr+YCbvjfhaphrivmeBQJart83',
|
|
126
|
-
'AhsMAAoJEDfhaphrivmenswBAKm7hI2qGtOZ5kTkOmRELJq76enPSQtdrvtbR5dv',
|
|
127
|
-
'ziZiAP9mU1Kajp2PVmj3IPpd+Q+F/2U8H7nrRndo97c2vPqFtQ==',
|
|
128
|
-
'=SwMu',
|
|
129
|
-
'-----END PGP PUBLIC KEY BLOCK-----'
|
|
130
|
-
].join('\n'),
|
|
131
|
-
priv: [
|
|
132
|
-
'-----BEGIN PGP PRIVATE KEY BLOCK-----',
|
|
133
|
-
'',
|
|
134
|
-
'lKYEWq7fNxMJKyQDAwIIAQEHAgMESvoep0lgc4/HqO0snFMMlVM3Pv19ljC+Ko1k',
|
|
135
|
-
'MkCmJygQTpfxaEBvVm3ChJmkfgWOcgxa5BJUnCg/JaMKkJmr3v4HAwK7JkccdLrR',
|
|
136
|
-
'Q+UXlwIhInNv95GHFscWoWYaCXMYtyaRleKvGGpKpQjZFvZ6SZncMs/EPQfJwl2L',
|
|
137
|
-
'I2lf8IdzqltNni5shQztIdBiIKm63+TjtBlzdW5ueSA8c3VubnlAc3Vubnkuc3Vu',
|
|
138
|
-
'bnk+iJAEExMKADgWIQQi1GdXVRHGK/mAm7434WqYa4r5ngUCWq7fNwIbAwULCQgH',
|
|
139
|
-
'AwUVCgkICwUWAgMBAAIeAQIXgAAKCRA34WqYa4r5nnXVAP4pks2qWReQZyiikZ15',
|
|
140
|
-
'L07ihLSbGEDOL76n1u2RNlITbgEAm+AzhpH+bCtAHj/k7Z+4D7ARzi8Xr19s8hYz',
|
|
141
|
-
'9WW00M+cqgRart83EgkrJAMDAggBAQcCAwQ8LjBghFzHDPwVVnGKEJ7H+RT+fufy',
|
|
142
|
-
'I/3Vl4BcyrHrxzShPDBjB5mB/ZA9KrAN5rpghwisJ9scd4S+3PPKtmWWAwEIB/4H',
|
|
143
|
-
'AwItYz56B2wwNeUvvrvksyKNTg6doelQWbzUeASV0Qg1IvZqFy20aU6E5B3z1VCt',
|
|
144
|
-
'wyD4GjZjlWsp/gVVk8ZvgBx6z0T/m5a9asD0xkc49iM7iHgEGBMKACAWIQQi1GdX',
|
|
145
|
-
'VRHGK/mAm7434WqYa4r5ngUCWq7fNwIbDAAKCRA34WqYa4r5np7MAQCpu4SNqhrT',
|
|
146
|
-
'meZE5DpkRCyau+npz0kLXa77W0eXb84mYgD/ZlNSmo6dj1Zo9yD6XfkPhf9lPB+5',
|
|
147
|
-
'60Z3aPe3Nrz6hbU=',
|
|
148
|
-
'=3Dct',
|
|
149
|
-
'-----END PGP PRIVATE KEY BLOCK-----'
|
|
150
|
-
].join('\n'),
|
|
151
|
-
message: 'second test message\n',
|
|
152
|
-
message_signed: [
|
|
153
|
-
'-----BEGIN PGP SIGNED MESSAGE-----',
|
|
154
|
-
'Hash: SHA512',
|
|
155
|
-
'',
|
|
156
|
-
'second test message',
|
|
157
|
-
'',
|
|
158
|
-
'-----BEGIN PGP SIGNATURE-----',
|
|
159
|
-
'Version: OpenPGP.js v3.1.0',
|
|
160
|
-
'Comment: https://openpgpjs.org',
|
|
161
|
-
'',
|
|
162
|
-
'wl4EARMKABAFAltbE34JEDfhaphrivmeAABaXQD+LzOhFxTqz8+IcaD3xzww',
|
|
163
|
-
'EjEn0u7qgCFem9PHPD4wqAcA/1WQE3N7DIwRG45HFd+ZBo4vcuRkWK+Q6CHl',
|
|
164
|
-
'upbAEX7k',
|
|
165
|
-
'=obwy',
|
|
166
|
-
'-----END PGP SIGNATURE-----'
|
|
167
|
-
].join('\n')
|
|
168
|
-
|
|
169
|
-
}
|
|
170
|
-
};
|
|
171
|
-
async function load_pub_key(name) {
|
|
172
|
-
if (data[name].pub_key) {
|
|
173
|
-
return data[name].pub_key;
|
|
174
|
-
}
|
|
175
|
-
const pub = await openpgp.key.readArmored(data[name].pub);
|
|
176
|
-
expect(pub).to.exist;
|
|
177
|
-
expect(pub.err).to.not.exist;
|
|
178
|
-
expect(pub.keys).to.have.length(1);
|
|
179
|
-
expect(pub.keys[0].getKeyId().toHex()).to.equal(data[name].id);
|
|
180
|
-
data[name].pub_key = pub.keys[0];
|
|
181
|
-
return data[name].pub_key;
|
|
182
|
-
}
|
|
183
|
-
async function load_priv_key(name) {
|
|
184
|
-
if (data[name].priv_key) {
|
|
185
|
-
return data[name].priv_key;
|
|
186
|
-
}
|
|
187
|
-
const pk = await openpgp.key.readArmored(data[name].priv);
|
|
188
|
-
expect(pk).to.exist;
|
|
189
|
-
expect(pk.err).to.not.exist;
|
|
190
|
-
expect(pk.keys).to.have.length(1);
|
|
191
|
-
expect(pk.keys[0].getKeyId().toHex()).to.equal(data[name].id);
|
|
192
|
-
expect(await pk.keys[0].decrypt(data[name].pass)).to.be.true;
|
|
193
|
-
data[name].priv_key = pk.keys[0];
|
|
194
|
-
return data[name].priv_key;
|
|
195
|
-
}
|
|
196
|
-
it('Load public key', async function () {
|
|
197
|
-
await load_pub_key('romeo');
|
|
198
|
-
await load_pub_key('juliet');
|
|
199
|
-
});
|
|
200
|
-
it('Load private key', async function () {
|
|
201
|
-
await load_priv_key('romeo');
|
|
202
|
-
await load_priv_key('juliet');
|
|
203
|
-
return true;
|
|
204
|
-
});
|
|
205
|
-
it('Verify clear signed message', async function () {
|
|
206
|
-
const pub = await load_pub_key('juliet');
|
|
207
|
-
const msg = await openpgp.cleartext.readArmored(data.juliet.message_signed);
|
|
208
|
-
return openpgp.verify({publicKeys: [pub], message: msg}).then(function(result) {
|
|
209
|
-
expect(result).to.exist;
|
|
210
|
-
expect(result.data).to.equal(data.juliet.message);
|
|
211
|
-
expect(result.signatures).to.have.length(1);
|
|
212
|
-
expect(result.signatures[0].valid).to.be.true;
|
|
213
|
-
});
|
|
214
|
-
});
|
|
215
|
-
it('Sign message', async function () {
|
|
216
|
-
const romeoPrivate = await load_priv_key('romeo');
|
|
217
|
-
const signed = await openpgp.sign({privateKeys: [romeoPrivate], message: openpgp.cleartext.fromText(data.romeo.message)});
|
|
218
|
-
const romeoPublic = await load_pub_key('romeo');
|
|
219
|
-
const msg = await openpgp.cleartext.readArmored(signed.data);
|
|
220
|
-
const result = await openpgp.verify({publicKeys: [romeoPublic], message: msg});
|
|
221
|
-
|
|
222
|
-
expect(result).to.exist;
|
|
223
|
-
expect(result.data).to.equal(data.romeo.message);
|
|
224
|
-
expect(result.signatures).to.have.length(1);
|
|
225
|
-
expect(result.signatures[0].valid).to.be.true;
|
|
226
|
-
});
|
|
227
|
-
it('Decrypt and verify message', async function () {
|
|
228
|
-
const juliet = await load_pub_key('juliet');
|
|
229
|
-
const romeo = await load_priv_key('romeo');
|
|
230
|
-
const msg = await openpgp.message.readArmored(data.romeo.message_encrypted);
|
|
231
|
-
const result = await openpgp.decrypt({ privateKeys: romeo, publicKeys: [juliet], message: msg });
|
|
232
|
-
|
|
233
|
-
expect(result).to.exist;
|
|
234
|
-
expect(result.data).to.equal(data.romeo.message);
|
|
235
|
-
expect(result.signatures).to.have.length(1);
|
|
236
|
-
expect(result.signatures[0].valid).to.be.true;
|
|
237
|
-
});
|
|
238
|
-
it('Decrypt and verify message with leading zero in hash', async function () {
|
|
239
|
-
const juliet = await load_priv_key('juliet');
|
|
240
|
-
const romeo = await load_pub_key('romeo');
|
|
241
|
-
const msg = await openpgp.message.readArmored(data.romeo.message_encrypted_with_leading_zero_in_hash);
|
|
242
|
-
const result = await openpgp.decrypt({privateKeys: juliet, publicKeys: [romeo], message: msg});
|
|
243
|
-
|
|
244
|
-
expect(result).to.exist;
|
|
245
|
-
expect(result.data).to.equal(data.romeo.message_with_leading_zero_in_hash);
|
|
246
|
-
expect(result.signatures).to.have.length(1);
|
|
247
|
-
expect(result.signatures[0].valid).to.be.true;
|
|
248
|
-
});
|
|
249
|
-
it('Decrypt and verify message with leading zero in hash signed with old elliptic algorithm', async function () {
|
|
250
|
-
//this test would not work with nodeCrypto, since message is signed with leading zero stripped from the hash
|
|
251
|
-
const use_native = openpgp.config.use_native;
|
|
252
|
-
openpgp.config.use_native = false;
|
|
253
|
-
const juliet = await load_priv_key('juliet');
|
|
254
|
-
const romeo = await load_pub_key('romeo');
|
|
255
|
-
const msg = await openpgp.message.readArmored(data.romeo. message_encrypted_with_leading_zero_in_hash_signed_by_elliptic_with_old_implementation);
|
|
256
|
-
const result = await openpgp.decrypt({privateKeys: juliet, publicKeys: [romeo], message: msg});
|
|
257
|
-
openpgp.config.use_native = use_native;
|
|
258
|
-
expect(result).to.exist;
|
|
259
|
-
expect(result.data).to.equal(data.romeo.message_with_leading_zero_in_hash_old_elliptic_implementation);
|
|
260
|
-
expect(result.signatures).to.have.length(1);
|
|
261
|
-
expect(result.signatures[0].valid).to.be.true;
|
|
262
|
-
});
|
|
263
|
-
|
|
264
|
-
it('Encrypt and sign message', async function () {
|
|
265
|
-
const romeoPrivate = await load_priv_key('romeo');
|
|
266
|
-
const julietPublic = await load_pub_key('juliet');
|
|
267
|
-
const encrypted = await openpgp.encrypt({publicKeys: [julietPublic], privateKeys: [romeoPrivate], message: openpgp.message.fromText(data.romeo.message)});
|
|
268
|
-
|
|
269
|
-
const message = await openpgp.message.readArmored(encrypted.data);
|
|
270
|
-
const romeoPublic = await load_pub_key('romeo');
|
|
271
|
-
const julietPrivate = await load_priv_key('juliet');
|
|
272
|
-
const result = await openpgp.decrypt({privateKeys: julietPrivate, publicKeys: [romeoPublic], message: message});
|
|
273
|
-
|
|
274
|
-
expect(result).to.exist;
|
|
275
|
-
expect(result.data).to.equal(data.romeo.message);
|
|
276
|
-
expect(result.signatures).to.have.length(1);
|
|
277
|
-
expect(result.signatures[0].valid).to.be.true;
|
|
278
|
-
});
|
|
279
|
-
});
|
|
280
|
-
|
|
281
|
-
function omnibus() {
|
|
282
|
-
it('Omnibus BrainpoolP256r1 Test', function() {
|
|
283
|
-
const options = { userIds: { name: "Hi", email: "hi@hel.lo" }, curve: "brainpoolP256r1" };
|
|
284
|
-
return openpgp.generateKey(options).then(function(firstKey) {
|
|
285
|
-
const hi = firstKey.key;
|
|
286
|
-
const pubHi = hi.toPublic();
|
|
287
|
-
|
|
288
|
-
const options = { userIds: { name: "Bye", email: "bye@good.bye" }, curve: "brainpoolP256r1" };
|
|
289
|
-
return openpgp.generateKey(options).then(function(secondKey) {
|
|
290
|
-
const bye = secondKey.key;
|
|
291
|
-
const pubBye = bye.toPublic();
|
|
292
|
-
|
|
293
|
-
const testData = input.createSomeMessage();
|
|
294
|
-
const testData2 = input.createSomeMessage();
|
|
295
|
-
return Promise.all([
|
|
296
|
-
// Signing message
|
|
297
|
-
openpgp.sign(
|
|
298
|
-
{ message: openpgp.cleartext.fromText(testData), privateKeys: hi }
|
|
299
|
-
).then(async signed => {
|
|
300
|
-
const msg = await openpgp.cleartext.readArmored(signed.data);
|
|
301
|
-
// Verifying signed message
|
|
302
|
-
return Promise.all([
|
|
303
|
-
openpgp.verify(
|
|
304
|
-
{ message: msg, publicKeys: pubHi }
|
|
305
|
-
).then(output => expect(output.signatures[0].valid).to.be.true),
|
|
306
|
-
// Verifying detached signature
|
|
307
|
-
openpgp.verify(
|
|
308
|
-
{
|
|
309
|
-
message: openpgp.cleartext.fromText(testData),
|
|
310
|
-
publicKeys: pubHi,
|
|
311
|
-
signature: await openpgp.signature.readArmored(signed.data)
|
|
312
|
-
}
|
|
313
|
-
).then(output => expect(output.signatures[0].valid).to.be.true)
|
|
314
|
-
]);
|
|
315
|
-
}),
|
|
316
|
-
// Encrypting and signing
|
|
317
|
-
openpgp.encrypt(
|
|
318
|
-
{
|
|
319
|
-
message: openpgp.message.fromText(testData2),
|
|
320
|
-
publicKeys: [pubBye],
|
|
321
|
-
privateKeys: [hi]
|
|
322
|
-
}
|
|
323
|
-
).then(async encrypted => {
|
|
324
|
-
const msg = await openpgp.message.readArmored(encrypted.data);
|
|
325
|
-
// Decrypting and verifying
|
|
326
|
-
return openpgp.decrypt(
|
|
327
|
-
{
|
|
328
|
-
message: msg,
|
|
329
|
-
privateKeys: bye,
|
|
330
|
-
publicKeys: [pubHi]
|
|
331
|
-
}
|
|
332
|
-
).then(output => {
|
|
333
|
-
expect(output.data).to.equal(testData2);
|
|
334
|
-
expect(output.signatures[0].valid).to.be.true;
|
|
335
|
-
});
|
|
336
|
-
})
|
|
337
|
-
]);
|
|
338
|
-
});
|
|
339
|
-
});
|
|
340
|
-
});
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
tryTests('Brainpool Omnibus Tests @lightweight', omnibus, {
|
|
344
|
-
if: !openpgp.config.ci && (openpgp.config.use_indutny_elliptic || openpgp.util.getNodeCrypto())
|
|
345
|
-
});
|
|
346
|
-
|
|
347
|
-
tryTests('Brainpool Omnibus Tests - Worker @lightweight', omnibus, {
|
|
348
|
-
if: typeof window !== 'undefined' && window.Worker && (openpgp.config.use_indutny_elliptic || openpgp.util.getNodeCrypto()),
|
|
349
|
-
before: async function() {
|
|
350
|
-
await openpgp.initWorker({ path: '../dist/openpgp.worker.js' });
|
|
351
|
-
},
|
|
352
|
-
beforeEach: function() {
|
|
353
|
-
openpgp.config.use_native = true;
|
|
354
|
-
},
|
|
355
|
-
after: function() {
|
|
356
|
-
openpgp.destroyWorker();
|
|
357
|
-
}
|
|
358
|
-
});
|
|
359
|
-
|
|
360
|
-
// TODO find test vectors
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
const openpgp = typeof window !== 'undefined' && window.openpgp ? window.openpgp : require('../../dist/openpgp');
|
|
2
|
-
|
|
3
|
-
const chai = require('chai');
|
|
4
|
-
chai.use(require('chai-as-promised'));
|
|
5
|
-
|
|
6
|
-
const expect = chai.expect;
|
|
7
|
-
|
|
8
|
-
const password = 'I am a password';
|
|
9
|
-
|
|
10
|
-
const tests = {
|
|
11
|
-
zip: {
|
|
12
|
-
input: `-----BEGIN PGP MESSAGE-----
|
|
13
|
-
|
|
14
|
-
jA0ECQMC5rhAA7l3jOzk0kwBTMc07y+1NME5RCUQ2EOlSofbh1KARLC5B1NMeBlq
|
|
15
|
-
jS917VBeCW3R21xG+0ZJ6Z5iWwdQD7XBtg19doWOqExSmXBWWW/6vSaD81ox
|
|
16
|
-
=Gw9+
|
|
17
|
-
-----END PGP MESSAGE-----`,
|
|
18
|
-
output: 'Hello world! With zip.'
|
|
19
|
-
},
|
|
20
|
-
zlib: {
|
|
21
|
-
input: `-----BEGIN PGP MESSAGE-----
|
|
22
|
-
|
|
23
|
-
jA0ECQMC8Qfig2+Tygnk0lMB++5JoyZUcpUy5EJqcxBuy93tXw+BSk7OhFhda1Uo
|
|
24
|
-
JuQlKv27HlyUaA55tMJsFYPypGBLEXW3k0xi3Cs87RrLqmVGTZSqNhHOVNE28lVe
|
|
25
|
-
W40mpQ==
|
|
26
|
-
=z0we
|
|
27
|
-
-----END PGP MESSAGE-----`,
|
|
28
|
-
output: 'Hello world! With zlib.'
|
|
29
|
-
},
|
|
30
|
-
bzip2: {
|
|
31
|
-
input: `-----BEGIN PGP MESSAGE-----
|
|
32
|
-
|
|
33
|
-
jA0ECQMC97w+wp7u9/Xk0oABBfapJBuuxGBiHDfNmVgsRzbjLDBWTJ3LD4UtxEku
|
|
34
|
-
qu6hwp5JXB0TgI/XQ3tKobSqHv1wSJ9SVxtWZq6WvWulu+j9GtzIVC3mbDA/qRA3
|
|
35
|
-
41sUEMdAFC6I7BYLYGEiUAVNpjbvGOmJWptDyawjRgEuZeTzKyTI/UcMc/rLy9Pz
|
|
36
|
-
Xg==
|
|
37
|
-
=6ek1
|
|
38
|
-
-----END PGP MESSAGE-----`,
|
|
39
|
-
output: 'Hello world! With bzip2.'
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
describe('Decrypt and decompress message tests', function () {
|
|
44
|
-
|
|
45
|
-
function runTest(key, test) {
|
|
46
|
-
it(`Decrypts message compressed with ${key}`, async function () {
|
|
47
|
-
const message = await openpgp.message.readArmored(test.input);
|
|
48
|
-
const options = {
|
|
49
|
-
passwords: password,
|
|
50
|
-
message
|
|
51
|
-
};
|
|
52
|
-
return openpgp.decrypt(options).then(function (encrypted) {
|
|
53
|
-
expect(encrypted.data).to.equal(test.output + '\n');
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
Object.keys(tests).forEach(key => runTest(key, tests[key]));
|
|
59
|
-
|
|
60
|
-
});
|
package/test/general/ecc_nist.js
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
/* globals tryTests: true */
|
|
2
|
-
|
|
3
|
-
const openpgp = typeof window !== 'undefined' && window.openpgp ? window.openpgp : require('../../dist/openpgp');
|
|
4
|
-
|
|
5
|
-
const chai = require('chai');
|
|
6
|
-
chai.use(require('chai-as-promised'));
|
|
7
|
-
const input = require('./testInputs.js');
|
|
8
|
-
|
|
9
|
-
const expect = chai.expect;
|
|
10
|
-
|
|
11
|
-
describe('Elliptic Curve Cryptography for NIST P-256,P-384,P-521 curves @lightweight', function () {
|
|
12
|
-
function omnibus() {
|
|
13
|
-
it('Omnibus NIST P-256 Test', function () {
|
|
14
|
-
const options = { userIds: {name: "Hi", email: "hi@hel.lo"}, curve: "p256" };
|
|
15
|
-
const testData = input.createSomeMessage();
|
|
16
|
-
const testData2 = input.createSomeMessage();
|
|
17
|
-
return openpgp.generateKey(options).then(function (firstKey) {
|
|
18
|
-
const hi = firstKey.key;
|
|
19
|
-
const pubHi = hi.toPublic();
|
|
20
|
-
|
|
21
|
-
const options = { userIds: { name: "Bye", email: "bye@good.bye" }, curve: "p256" };
|
|
22
|
-
return openpgp.generateKey(options).then(function (secondKey) {
|
|
23
|
-
const bye = secondKey.key;
|
|
24
|
-
const pubBye = bye.toPublic();
|
|
25
|
-
|
|
26
|
-
return Promise.all([
|
|
27
|
-
// Signing message
|
|
28
|
-
|
|
29
|
-
openpgp.sign(
|
|
30
|
-
{ message: openpgp.cleartext.fromText(testData), privateKeys: hi }
|
|
31
|
-
).then(async signed => {
|
|
32
|
-
const msg = await openpgp.cleartext.readArmored(signed.data);
|
|
33
|
-
// Verifying signed message
|
|
34
|
-
return Promise.all([
|
|
35
|
-
openpgp.verify(
|
|
36
|
-
{ message: msg, publicKeys: pubHi }
|
|
37
|
-
).then(output => expect(output.signatures[0].valid).to.be.true),
|
|
38
|
-
// Verifying detached signature
|
|
39
|
-
openpgp.verify(
|
|
40
|
-
{ message: openpgp.cleartext.fromText(testData),
|
|
41
|
-
publicKeys: pubHi,
|
|
42
|
-
signature: await openpgp.signature.readArmored(signed.data) }
|
|
43
|
-
).then(output => expect(output.signatures[0].valid).to.be.true)
|
|
44
|
-
]);
|
|
45
|
-
}),
|
|
46
|
-
// Encrypting and signing
|
|
47
|
-
openpgp.encrypt(
|
|
48
|
-
{ message: openpgp.message.fromText(testData2),
|
|
49
|
-
publicKeys: [pubBye],
|
|
50
|
-
privateKeys: [hi] }
|
|
51
|
-
).then(async encrypted => {
|
|
52
|
-
const msg = await openpgp.message.readArmored(encrypted.data);
|
|
53
|
-
// Decrypting and verifying
|
|
54
|
-
return openpgp.decrypt(
|
|
55
|
-
{ message: msg,
|
|
56
|
-
privateKeys: bye,
|
|
57
|
-
publicKeys: [pubHi] }
|
|
58
|
-
).then(output => {
|
|
59
|
-
expect(output.data).to.equal(testData2);
|
|
60
|
-
expect(output.signatures[0].valid).to.be.true;
|
|
61
|
-
});
|
|
62
|
-
})
|
|
63
|
-
]);
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
omnibus();
|
|
70
|
-
|
|
71
|
-
it('Sign message', async function () {
|
|
72
|
-
const testData = input.createSomeMessage();
|
|
73
|
-
let options = { userIds: {name: "Hi", email: "hi@hel.lo"}, curve: "p256" };
|
|
74
|
-
const firstKey = await openpgp.generateKey(options);
|
|
75
|
-
const signature = await openpgp.sign({ message: openpgp.cleartext.fromText(testData), privateKeys: firstKey.key });
|
|
76
|
-
const msg = await openpgp.cleartext.readArmored(signature.data);
|
|
77
|
-
const result = await openpgp.verify({ message: msg, publicKeys: firstKey.key.toPublic()});
|
|
78
|
-
expect(result.signatures[0].valid).to.be.true;
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
it('encrypt and sign message', async function () {
|
|
82
|
-
const testData = input.createSomeMessage();
|
|
83
|
-
let options = { userIds: {name: "Hi", email: "hi@hel.lo"}, curve: "p256" };
|
|
84
|
-
const firstKey = await openpgp.generateKey(options);
|
|
85
|
-
options = { userIds: { name: "Bye", email: "bye@good.bye" }, curve: "p256" };
|
|
86
|
-
const secondKey = await openpgp.generateKey(options);
|
|
87
|
-
const encrypted = await openpgp.encrypt(
|
|
88
|
-
{ message: openpgp.message.fromText(testData),
|
|
89
|
-
publicKeys: [secondKey.key.toPublic()],
|
|
90
|
-
privateKeys: [firstKey.key] }
|
|
91
|
-
);
|
|
92
|
-
const msg = await openpgp.message.readArmored(encrypted.data);
|
|
93
|
-
const result = await openpgp.decrypt(
|
|
94
|
-
{ message: msg,
|
|
95
|
-
privateKeys: secondKey.key,
|
|
96
|
-
publicKeys: [firstKey.key.toPublic()] }
|
|
97
|
-
)
|
|
98
|
-
expect(result.signatures[0].valid).to.be.true;
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
tryTests('ECC Worker Tests', omnibus, {
|
|
102
|
-
if: typeof window !== 'undefined' && window.Worker,
|
|
103
|
-
before: async function() {
|
|
104
|
-
await openpgp.initWorker({ path:'../dist/openpgp.worker.js' });
|
|
105
|
-
},
|
|
106
|
-
beforeEach: function() {
|
|
107
|
-
openpgp.config.use_native = true;
|
|
108
|
-
},
|
|
109
|
-
after: function() {
|
|
110
|
-
openpgp.destroyWorker();
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
// TODO find test vectors
|
|
115
|
-
});
|