Initial commit
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
const { getCurves } = require('crypto')
|
||||
|
||||
const curves = new Set()
|
||||
|
||||
if (getCurves().includes('prime256v1')) {
|
||||
curves.add('P-256')
|
||||
}
|
||||
|
||||
if (getCurves().includes('secp256k1')) {
|
||||
curves.add('secp256k1')
|
||||
}
|
||||
|
||||
if (getCurves().includes('secp384r1')) {
|
||||
curves.add('P-384')
|
||||
}
|
||||
|
||||
if (getCurves().includes('secp521r1')) {
|
||||
curves.add('P-521')
|
||||
}
|
||||
|
||||
module.exports = curves
|
||||
+1
@@ -0,0 +1 @@
|
||||
module.exports = new Map()
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
const EC_CURVES = require('./ec_curves')
|
||||
const IVLENGTHS = require('./iv_lengths')
|
||||
const JWA = require('./jwa')
|
||||
const JWK = require('./jwk')
|
||||
const KEYLENGTHS = require('./key_lengths')
|
||||
const OKP_CURVES = require('./okp_curves')
|
||||
const ECDH_DERIVE_LENGTHS = require('./ecdh_derive_lengths')
|
||||
|
||||
module.exports = {
|
||||
EC_CURVES,
|
||||
ECDH_DERIVE_LENGTHS,
|
||||
IVLENGTHS,
|
||||
JWA,
|
||||
JWK,
|
||||
KEYLENGTHS,
|
||||
OKP_CURVES
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
module.exports = new Map([
|
||||
['A128CBC-HS256', 128],
|
||||
['A128GCM', 96],
|
||||
['A128GCMKW', 96],
|
||||
['A192CBC-HS384', 128],
|
||||
['A192GCM', 96],
|
||||
['A192GCMKW', 96],
|
||||
['A256CBC-HS512', 128],
|
||||
['A256GCM', 96],
|
||||
['A256GCMKW', 96]
|
||||
])
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
module.exports = {
|
||||
sign: new Map(),
|
||||
verify: new Map(),
|
||||
keyManagementEncrypt: new Map(),
|
||||
keyManagementDecrypt: new Map(),
|
||||
encrypt: new Map(),
|
||||
decrypt: new Map()
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
module.exports = {
|
||||
oct: {
|
||||
decrypt: {},
|
||||
deriveKey: {},
|
||||
encrypt: {},
|
||||
sign: {},
|
||||
unwrapKey: {},
|
||||
verify: {},
|
||||
wrapKey: {}
|
||||
},
|
||||
EC: {
|
||||
decrypt: {},
|
||||
deriveKey: {},
|
||||
encrypt: {},
|
||||
sign: {},
|
||||
unwrapKey: {},
|
||||
verify: {},
|
||||
wrapKey: {}
|
||||
},
|
||||
RSA: {
|
||||
decrypt: {},
|
||||
deriveKey: {},
|
||||
encrypt: {},
|
||||
sign: {},
|
||||
unwrapKey: {},
|
||||
verify: {},
|
||||
wrapKey: {}
|
||||
},
|
||||
OKP: {
|
||||
decrypt: {},
|
||||
deriveKey: {},
|
||||
encrypt: {},
|
||||
sign: {},
|
||||
unwrapKey: {},
|
||||
verify: {},
|
||||
wrapKey: {}
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
module.exports = new Map([
|
||||
['A128CBC-HS256', 256],
|
||||
['A128GCM', 128],
|
||||
['A192CBC-HS384', 384],
|
||||
['A192GCM', 192],
|
||||
['A256CBC-HS512', 512],
|
||||
['A256GCM', 256]
|
||||
])
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
const curves = new Set(['Ed25519'])
|
||||
|
||||
if (!('electron' in process.versions)) {
|
||||
curves.add('Ed448')
|
||||
curves.add('X25519')
|
||||
curves.add('X448')
|
||||
}
|
||||
|
||||
module.exports = curves
|
||||
Reference in New Issue
Block a user