| /third_party/node/lib/internal/crypto/ |
| D | webcrypto.js | 64 async function digest(algorithm, data) { argument 70 algorithm = webidl.converters.AlgorithmIdentifier(algorithm, { 79 algorithm = normalizeAlgorithm(algorithm, 'digest'); 81 return ReflectApply(asyncDigest, this, [algorithm, data]); 90 algorithm, argument 98 algorithm = webidl.converters.AlgorithmIdentifier(algorithm, { 111 algorithm = normalizeAlgorithm(algorithm, 'generateKey'); 114 switch (algorithm.name) { 122 .rsaKeyGenerate(algorithm, extractable, keyUsages); 133 .cfrgGenerateKey(algorithm, extractable, keyUsages); [all …]
|
| /third_party/node/test/parallel/ |
| D | test-webcrypto-sign-verify-rsa.js | 15 algorithm, property 32 { name: algorithm.name, hash }, 38 { name: algorithm.name, hash }, 44 { name: algorithm.name, hash }, 61 assert(await subtle.verify(algorithm, publicKey, signature, plaintext)); 66 const p = subtle.verify(algorithm, publicKey, sigcopy, copy); 73 subtle.verify(algorithm, privateKey, signature, plaintext), { 78 subtle.verify(algorithm, noVerifyPublicKey, signature, plaintext), { 84 subtle.verify(algorithm, hmacKey, signature, plaintext), { 89 subtle.verify(algorithm, ecdsaKeys.publicKey, signature, plaintext), { [all …]
|
| D | test-webcrypto-encrypt-decrypt-rsa.js | 33 algorithm, property 46 algorithm.name, 52 const result = await subtle.decrypt(algorithm, privateKey, ciphertext); 61 const result2 = await subtle.decrypt(algorithm, privateKey, ciphercopy); 72 algorithm, property 85 algorithm.name, 95 const result = await subtle.encrypt(algorithm, publicKey, plaintext); 101 privateKey.algorithm.modulusLength); 103 const out = await subtle.decrypt(algorithm, privateKey, result); 110 async function testEncryptionLongPlaintext({ algorithm, property [all …]
|
| D | test-webcrypto-wrap-unwrap.js | 66 algorithm: { property 77 algorithm: { property 88 algorithm: { property 99 algorithm: { property 108 algorithm: { property 117 algorithm: { property 125 algorithm: { property 133 algorithm: { property 141 algorithm: { property 149 algorithm: { property [all …]
|
| D | test-webcrypto-keygen.js | 31 algorithm: { length: 256 }, property 41 algorithm: { length: 256 }, property 51 algorithm: { length: 256 }, property 61 algorithm: { length: 256 }, property 69 algorithm: { length: 256, hash: 'SHA-256' }, property 77 algorithm: { property 89 algorithm: { property 101 algorithm: { property 115 algorithm: { namedCurve: 'P-521' }, property 123 algorithm: { namedCurve: 'P-521' }, property [all …]
|
| D | test-webcrypto-derivebits-hkdf.js | 228 const algorithm = { variable 236 algorithm, 252 const algorithm = { variable 261 subtle.deriveBits(algorithm, baseKeys[size], undefined), { 265 subtle.deriveBits(algorithm, baseKeys[size], 0), { 270 subtle.deriveBits(algorithm, baseKeys[size], null), { 275 subtle.deriveBits(algorithm, baseKeys[size], 15), { 290 const algorithm = { name: 'HKDF', salt, info }; variable 296 ...algorithm, 305 ...algorithm, [all …]
|
| D | test-webcrypto-encrypt-decrypt-aes.js | 12 async function testEncrypt({ keyBuffer, algorithm, plaintext, result }) { property 19 { name: algorithm.name }, 23 const output = await subtle.encrypt(algorithm, key, plaintext); 32 const check = Buffer.from(await subtle.decrypt(algorithm, key, output)); 40 async function testEncryptNoEncrypt({ keyBuffer, algorithm, plaintext }) { property 44 { name: algorithm.name }, 48 return assert.rejects(subtle.encrypt(algorithm, key, plaintext), { 53 async function testEncryptNoDecrypt({ keyBuffer, algorithm, plaintext }) { property 57 { name: algorithm.name }, 61 const output = await subtle.encrypt(algorithm, key, plaintext); [all …]
|
| /third_party/openssl/test/recipes/ |
| D | 15-test_gendhparam.t | 19 algorithm => 'DHX', 25 algorithm => 'DH', 31 algorithm => 'DHX', 37 algorithm => 'DHX', 43 algorithm => 'DHX', 49 algorithm => 'DH', 55 algorithm => 'DH', 61 algorithm => 'DH', 67 algorithm => 'DH', 73 algorithm => 'DH', [all …]
|
| /third_party/node/test/fixtures/wpt/WebCryptoAPI/derive_bits_keys/ |
| D | hkdf_vectors.js | 32 {algorithm: {name: "AES-CBC", length: 128}, usages: ["encrypt", "decrypt"]}, property 33 {algorithm: {name: "AES-CBC", length: 192}, usages: ["encrypt", "decrypt"]}, property 34 {algorithm: {name: "AES-CBC", length: 256}, usages: ["encrypt", "decrypt"]}, property 35 {algorithm: {name: "AES-CTR", length: 128}, usages: ["encrypt", "decrypt"]}, property 36 {algorithm: {name: "AES-CTR", length: 192}, usages: ["encrypt", "decrypt"]}, property 37 {algorithm: {name: "AES-CTR", length: 256}, usages: ["encrypt", "decrypt"]}, property 38 {algorithm: {name: "AES-GCM", length: 128}, usages: ["encrypt", "decrypt"]}, property 39 {algorithm: {name: "AES-GCM", length: 192}, usages: ["encrypt", "decrypt"]}, property 40 {algorithm: {name: "AES-GCM", length: 256}, usages: ["encrypt", "decrypt"]}, property 41 {algorithm: {name: "AES-KW", length: 128}, usages: ["wrapKey", "unwrapKey"]}, property [all …]
|
| D | pbkdf2_vectors.js | 31 {algorithm: {name: "AES-CBC", length: 128}, usages: ["encrypt", "decrypt"]}, property 32 {algorithm: {name: "AES-CBC", length: 192}, usages: ["encrypt", "decrypt"]}, property 33 {algorithm: {name: "AES-CBC", length: 256}, usages: ["encrypt", "decrypt"]}, property 34 {algorithm: {name: "AES-CTR", length: 128}, usages: ["encrypt", "decrypt"]}, property 35 {algorithm: {name: "AES-CTR", length: 192}, usages: ["encrypt", "decrypt"]}, property 36 {algorithm: {name: "AES-CTR", length: 256}, usages: ["encrypt", "decrypt"]}, property 37 {algorithm: {name: "AES-GCM", length: 128}, usages: ["encrypt", "decrypt"]}, property 38 {algorithm: {name: "AES-GCM", length: 192}, usages: ["encrypt", "decrypt"]}, property 39 {algorithm: {name: "AES-GCM", length: 256}, usages: ["encrypt", "decrypt"]}, property 40 {algorithm: {name: "AES-KW", length: 128}, usages: ["wrapKey", "unwrapKey"]}, property [all …]
|
| D | hkdf.js | 36 … var algorithm = {name: "HKDF", salt: salts[saltSize], info: infos[infoSize], hash: hashName}; variable 40 return subtle.deriveBits(algorithm, baseKeys[derivedKeySize], 256) 50 return subtle.deriveBits(algorithm, baseKeys[derivedKeySize], 0) 62 Object.keys(derivedKeyType.algorithm).forEach(function(prop) { 63 testName += prop + ": " + derivedKeyType.algorithm[prop] + " "; 69 …return subtle.deriveKey(algorithm, baseKeys[derivedKeySize], derivedKeyType.algorithm, true, deriv… 74 …s[derivedKeySize][saltSize][hashName][infoSize].slice(0, derivedKeyType.algorithm.length/8)), "Exp… 89 … var badAlgorithm = {name: "HKDF", salt: salts[saltSize], hash: badHash, info: algorithm.info}; 90 …subtle.deriveKey(badAlgorithm, baseKeys[derivedKeySize], derivedKeyType.algorithm, true, derivedKe… 100 …return subtle.deriveKey(algorithm, noKey[derivedKeySize], derivedKeyType.algorithm, true, derivedK… [all …]
|
| /third_party/node/test/fixtures/wpt/WebCryptoAPI/import_export/ |
| D | symmetric_importKey.https.any.js | 38 var algorithm = {name: vector.name}; variable 40 algorithm.hash = vector.hash; 49 data = jwkData(keyData, algorithm); 53 … testFormat(format, algorithm, data, keyData.length * 8, usages, extractable); 55 testEmptyUsages(format, algorithm, data, keyData.length * 8, extractable); 62 function hasLength(algorithm) { argument 63 return algorithm.name === 'HMAC' || algorithm.name.startsWith('AES'); 68 function testFormat(format, algorithm, keyData, keySize, usages, extractable) { argument 70 return subtle.importKey(format, keyData, algorithm, extractable, usages). 73 …assert_goodCryptoKey(key, hasLength(key.algorithm) ? { length: keySize, ...algorithm } : algorithm… [all …]
|
| D | okp_importKey_failures.js | 37 function parameterString(format, algorithm, extractable, usages, data) { argument 38 if (typeof algorithm !== "object" && typeof algorithm !== "string") { 39 alert(algorithm); 48 objectToString(algorithm) + ", " + 61 …function testError(format, algorithm, keyData, keySize, usages, extractable, expectedError, testTa… argument 65 key = await subtle.importKey(format, keyData, algorithm, extractable, usages); 71 … }, testTag + ": importKey" + parameterString(format, algorithm, extractable, usages, keyData)); 125 allAlgorithmSpecifiersFor(name).forEach(function(algorithm) { argument 128 …testError(test.format, algorithm, test.data, name, usages, extractable, "SyntaxError", "Bad usages… 140 allAlgorithmSpecifiersFor(name).forEach(function(algorithm) { argument [all …]
|
| D | rsa_importKey.https.any.js | 83 var algorithm = {name: vector.name, hash: hash}; variable 89 testFormat(format, algorithm, data, size, usages, extractable); 96 var algorithm = {name: vector.name, hash: hash}; variable 99 testFormat(format, algorithm, data, size, usages, extractable); 101 testEmptyUsages(format, algorithm, data, size, extractable); 112 function testFormat(format, algorithm, keyData, keySize, usages, extractable) { argument 114 return subtle.importKey(format, keyData[format], algorithm, extractable, usages). 117 …assert_goodCryptoKey(key, algorithm, extractable, usages, (format === 'pkcs8' || (format === 'jwk'… 135 …eySize.toString() + " bits " + parameterString(format, keyData[format], algorithm, extractable, us… 140 function testEmptyUsages(format, algorithm, keyData, keySize, extractable) { argument [all …]
|
| D | ec_importKey.https.any.js | 76 var algorithm = {name: vector.name, namedCurve: curve}; variable 82 testFormat(format, algorithm, data, curve, usages, extractable); 89 var algorithm = {name: vector.name, namedCurve: curve}; variable 92 testFormat(format, algorithm, data, curve, usages, extractable); 94 testEmptyUsages(format, algorithm, data, curve, extractable); 104 function testFormat(format, algorithm, data, keySize, usages, extractable) { argument 111 return subtle.importKey(format, keyData, algorithm, extractable, usages). 114 …assert_goodCryptoKey(key, algorithm, extractable, usages, (format === 'pkcs8' || (format === 'jwk'… 136 …ze.toString() + " bits " + parameterString(format, compressed, keyData, algorithm, extractable, us… 141 function testEmptyUsages(format, algorithm, data, keySize, extractable) { argument [all …]
|
| /third_party/node/test/fixtures/wpt/WebCryptoAPI/wrapKey_unwrapKey/ |
| D | wrapKey_unwrapKey.https.any.js | 80 …{algorithm: {name: "RSASSA-PKCS1-v1_5", modulusLength: 1024, publicExponent: new Uint8Array([1,0,1… property 81 …{algorithm: {name: "RSA-PSS", modulusLength: 1024, publicExponent: new Uint8Array([1,0,1]), hash: … property 82 …{algorithm: {name: "RSA-OAEP", modulusLength: 1024, publicExponent: new Uint8Array([1,0,1]), hash:… property 83 …{algorithm: {name: "ECDSA", namedCurve: "P-256"}, privateUsages: ["sign"], publicUsages: ["verify"… property 84 … {algorithm: {name: "ECDH", namedCurve: "P-256"}, privateUsages: ["deriveBits"], publicUsages: []}, property 85 {algorithm: {name: "Ed25519" }, privateUsages: ["sign"], publicUsages: ["verify"]}, property 86 {algorithm: {name: "Ed448" }, privateUsages: ["sign"], publicUsages: ["verify"]}, property 87 {algorithm: {name: "X25519" }, privateUsages: ["deriveBits"], publicUsages: []}, property 88 {algorithm: {name: "X448" }, privateUsages: ["deriveBits"], publicUsages: []}, property 89 {algorithm: {name: "AES-CTR", length: 128}, usages: ["encrypt", "decrypt"]}, property [all …]
|
| /third_party/node/test/fixtures/wpt/WebCryptoAPI/generateKey/ |
| D | failures.js | 52 function parameterString(algorithm, extractable, usages) { argument 53 if (typeof algorithm !== "object" && typeof algorithm !== "string") { 54 alert(algorithm); 58 objectToString(algorithm) + ", " + 71 function testError(algorithm, extractable, usages, expectedError, testTag) { argument 73 return crypto.subtle.generateKey(algorithm, extractable, usages) 83 }, testTag + ": generateKey" + parameterString(algorithm, extractable, usages)); 160 badAlgorithmNames.forEach(function(algorithm) { argument 164 testError(algorithm, extractable, usages, "NotSupportedError", "Bad algorithm"); 176 allAlgorithmSpecifiersFor(name).forEach(function(algorithm) { argument [all …]
|
| /third_party/node/test/fixtures/wpt/WebCryptoAPI/sign_verify/ |
| D | rsa.js | 19 …var operation = subtle.verify(vector.algorithm, vector.publicKey, vector.signature, vector.plainte… 46 … var operation = subtle.verify(vector.algorithm, vector.publicKey, signature, vector.plaintext) 71 … var operation = subtle.verify(vector.algorithm, vector.publicKey, vector.signature, plaintext) 95 … return subtle.verify(vector.algorithm, vector.privateKey, vector.signature, vector.plaintext) 117 return subtle.sign(vector.algorithm, vector.publicKey, vector.plaintext) 140 … return subtle.verify(vector.algorithm, vector.publicKey, vector.signature, vector.plaintext) 159 … const isDeterministic = !("saltLength" in vector.algorithm) || vector.algorithm.saltLength == 0; 163 return subtle.sign(vector.algorithm, vector.privateKey, vector.plaintext) 170 … return subtle.verify(vector.algorithm, vector.publicKey, signature, vector.plaintext) 180 return subtle.sign(vector.algorithm, vector.privateKey, vector.plaintext) [all …]
|
| D | eddsa.js | 18 var algorithm = {name: vector.algorithmName}; variable 20 … var operation = subtle.verify(algorithm, vector.publicKey, vector.signature, vector.data) 45 var algorithm = {name: vector.algorithmName}; variable 48 var operation = subtle.verify(algorithm, vector.publicKey, signature, vector.data) 71 var algorithm = {name: vector.algorithmName}; variable 74 var operation = subtle.verify(algorithm, vector.publicKey, vector.signature, data) 97 var algorithm = {name: vector.algorithmName}; variable 99 return subtle.verify(algorithm, vector.privateKey, vector.signature, vector.data) 120 var algorithm = {name: vector.algorithmName}; variable 122 return subtle.sign(algorithm, vector.publicKey, vector.data) [all …]
|
| D | ecdsa.js | 19 var algorithm = {name: vector.algorithmName, hash: vector.hashName}; variable 21 … var operation = subtle.verify(algorithm, vector.publicKey, vector.signature, vector.plaintext) 46 var algorithm = {name: vector.algorithmName, hash: vector.hashName}; variable 49 … var operation = subtle.verify(algorithm, vector.publicKey, signature, vector.plaintext) 72 var algorithm = {name: vector.algorithmName, hash: vector.hashName}; variable 75 … var operation = subtle.verify(algorithm, vector.publicKey, vector.signature, plaintext) 98 var algorithm = {name: vector.algorithmName, hash: vector.hashName}; variable 100 … return subtle.verify(algorithm, vector.privateKey, vector.signature, vector.plaintext) 121 var algorithm = {name: vector.algorithmName, hash: vector.hashName}; variable 123 return subtle.sign(algorithm, vector.publicKey, vector.plaintext) [all …]
|
| /third_party/node/deps/npm/node_modules/ssri/lib/ |
| D | index.js | 37 if (this.algorithm !== null && !this.algorithms.includes(this.algorithm)) { 38 this.algorithms.push(this.algorithm) 50 this.algorithm = null 53 this.algorithm = this.sri.algorithm 56 this.algorithm = this.sri.pickAlgorithm(this.opts) 59 this.digests = this.goodSri ? this.sri[this.algorithm] : null 111 …const err = new Error(`${this.sri} integrity checksum failed when using ${this.algorithm}: wanted … 115 err.algorithm = this.algorithm 143 this.algorithm = '' 159 this.algorithm = match[1] [all …]
|
| /third_party/node/test/pummel/ |
| D | test-webcrypto-derivebits-pbkdf2.js | 419 const algorithm = { variable 426 const bits = await subtle.deriveBits(algorithm, baseKeys[size], 256); 440 const algorithm = { variable 449 subtle.deriveBits(algorithm, baseKeys[size], undefined), { 453 subtle.deriveBits(algorithm, baseKeys[size], 0), { 458 subtle.deriveBits(algorithm, baseKeys[size], null), { 463 subtle.deriveBits(algorithm, baseKeys[size], 15), { 477 const algorithm = { name: 'PBKDF2', salt, iterations }; variable 483 ...algorithm, 492 ...algorithm, [all …]
|
| /third_party/ltp/testcases/kernel/security/integrity/ima/tests/ |
| D | ima_setup.sh | 25 local algorithm="$1" 29 digest="$(${algorithm}sum $file 2>/dev/null | cut -f1 -d ' ')" 35 digest="$(openssl $algorithm $file 2>/dev/null | cut -f2 -d ' ')" 42 local arg="$algorithm" 43 case "$algorithm" in 229 local algorithm digest 244 algorithm=$(echo "$digest" | cut -d $delimiter -f 1) 248 32) algorithm="md5" ;; 249 40) algorithm="sha1" ;; 255 if [ -z "$algorithm" ]; then [all …]
|
| /third_party/openssl/crypto/asn1/ |
| D | x_algor.c | 19 ASN1_SIMPLE(X509_ALGOR, algorithm, ASN1_OBJECT), 43 ASN1_OBJECT_free(alg->algorithm); 44 alg->algorithm = aobj; 60 *paobj = algor->algorithm; in X509_ALGOR_get0() 90 rv = OBJ_cmp(a->algorithm, b->algorithm); in X509_ALGOR_cmp() 103 if (dest->algorithm) in X509_ALGOR_copy() 104 ASN1_OBJECT_free(dest->algorithm); in X509_ALGOR_copy() 105 dest->algorithm = NULL; in X509_ALGOR_copy() 111 if (src->algorithm) in X509_ALGOR_copy() 112 if ((dest->algorithm = OBJ_dup(src->algorithm)) == NULL) in X509_ALGOR_copy() [all …]
|
| /third_party/node/deps/openssl/openssl/crypto/asn1/ |
| D | x_algor.c | 19 ASN1_SIMPLE(X509_ALGOR, algorithm, ASN1_OBJECT), 43 ASN1_OBJECT_free(alg->algorithm); 44 alg->algorithm = aobj; 60 *paobj = algor->algorithm; in X509_ALGOR_get0() 90 rv = OBJ_cmp(a->algorithm, b->algorithm); in X509_ALGOR_cmp() 103 if (dest->algorithm) in X509_ALGOR_copy() 104 ASN1_OBJECT_free(dest->algorithm); in X509_ALGOR_copy() 105 dest->algorithm = NULL; in X509_ALGOR_copy() 111 if (src->algorithm) in X509_ALGOR_copy() 112 if ((dest->algorithm = OBJ_dup(src->algorithm)) == NULL) in X509_ALGOR_copy() [all …]
|