Home
last modified time | relevance | path

Searched refs:crypto (Results 1 – 25 of 577) sorted by relevance

12345678910>>...24

/third_party/openssl/
DBUILD.gn22 "./crypto",
24 "./crypto/modes",
25 "./crypto/ec/curve448",
26 "./crypto/ec/curve448/arch_32",
173 "crypto/aes/aes_cbc.c",
174 "crypto/aes/aes_cfb.c",
175 "crypto/aes/aes_ecb.c",
176 "crypto/aes/aes_ige.c",
177 "crypto/aes/aes_misc.c",
178 "crypto/aes/aes_ofb.c",
[all …]
Dcreate_asm_file.sh24 rm -rf crypto/aes/asm/arm32
25 rm -rf crypto/bn/asm/arm32
26 rm -rf crypto/chacha/asm/arm32
27 rm -rf crypto/ec/asm/arm32
28 rm -rf crypto/modes/asm/arm32
29 rm -rf crypto/poly1305/asm/arm32
30 rm -rf crypto/sha/asm/arm32
31 rm -rf crypto/armv4cpuid.S
32 mkdir crypto/aes/asm/arm32
33 mkdir crypto/bn/asm/arm32
[all …]
/third_party/libwebsockets/minimal-examples/crypto/minimal-crypto-cose-sign/
DCMakeLists.txt1 project(lws-crypto-cose-sign C)
8 set(SAMP lws-crypto-cose-sign)
20 add_test(NAME crypto-cose-sign-1
21 COMMAND lws-crypto-cose-sign -s -k set1.cks --kid 11
25 add_test(NAME crypto-cose-sign-2
26 COMMAND lws-crypto-cose-sign -s -k set1.cks --kid sec384
30 add_test(NAME crypto-cose-sign-3
31 COMMAND lws-crypto-cose-sign -s -k set1.cks --kid sec512
38 add_test(NAME crypto-cose-sign-4
39 COMMAND lws-crypto-cose-sign -k set1.cks
[all …]
/third_party/node/test/parallel/
Dtest-crypto-sign-verify.js10 const crypto = require('crypto'); constant
19 const Sign = crypto.Sign;
26 const Verify = crypto.Verify;
43 crypto.createSign('sha1').sign(
60 crypto.createSign('SHA1')
64 padding: crypto.constants.RSA_PKCS1_OAEP_PADDING
72 () => crypto.createVerify('SHA256').verify({
83 () => crypto.createVerify('SHA256').verify({
95 const s1 = crypto.createSign('SHA1')
98 let s1stream = crypto.createSign('SHA1');
[all …]
Dtest-crypto-pbkdf2.js7 const crypto = require('crypto'); constant
14 crypto.pbkdf2Sync(password, salt, iterations, keylen, 'sha256');
17 crypto.pbkdf2(password, salt, iterations, keylen, 'sha256',
49 const key = crypto.pbkdf2Sync('password', 'salt', 32, 32, 'sha256');
52 crypto.pbkdf2('password', 'salt', 32, 32, 'sha256',
61 () => crypto.pbkdf2('password', 'salt', 1, 20, 'sha1'),
70 () => crypto.pbkdf2Sync('password', 'salt', iterations, 20, 'sha1'),
83 crypto.pbkdf2Sync('password', 'salt', 1, notNumber, 'sha256');
95 crypto.pbkdf2('password', 'salt', 1, input, 'sha256',
108 crypto.pbkdf2('password', 'salt', 1, input, 'sha256',
[all …]
Dtest-crypto-dh-stateless.js7 const crypto = require('crypto'); constant
9 assert.throws(() => crypto.diffieHellman(), {
18 const buf1 = crypto.diffieHellman({
22 const buf2 = crypto.diffieHellman({
32 const alicePrivateKey = crypto.createPrivateKey({
47 const alicePublicKey = crypto.createPublicKey({
62 const bobPrivateKey = crypto.createPrivateKey({
77 const bobPublicKey = crypto.createPublicKey({
92 assert.throws(() => crypto.diffieHellman({ privateKey: alicePrivateKey }), {
98 assert.throws(() => crypto.diffieHellman({ publicKey: alicePublicKey }), {
[all …]
Dtest-crypto-hash.js7 const crypto = require('crypto'); constant
16 const a1 = crypto.createHash('sha1').update('Test123').digest('hex');
17 const a2 = crypto.createHash('sha256').update('Test123').digest('base64');
18 const a3 = crypto.createHash('sha512').update('Test123').digest(); // buffer
19 const a4 = crypto.createHash('sha1').update('Test123').digest('buffer');
22 let a5 = crypto.createHash('sha512');
26 let a6 = crypto.createHash('sha512');
33 let a7 = crypto.createHash('sha512');
37 let a8 = crypto.createHash('sha512');
45 const a0 = crypto.createHash(cryptoType).update('Test123').digest(digest);
[all …]
Dtest-crypto-rsa-dsa.js7 const crypto = require('crypto'); constant
9 const constants = crypto.constants;
43 let encryptedBuffer = crypto.publicEncrypt(rsaPubPem, bufferToEncrypt);
45 let decryptedBuffer = crypto.privateDecrypt(rsaKeyPem, encryptedBuffer);
48 decryptedBuffer = crypto.privateDecrypt(rsaPkcs8KeyPem, encryptedBuffer);
51 let decryptedBufferWithPassword = crypto.privateDecrypt({
57 encryptedBuffer = crypto.publicEncrypt({
62 decryptedBufferWithPassword = crypto.privateDecrypt({
68 encryptedBuffer = crypto.privateEncrypt({
73 decryptedBufferWithPassword = crypto.publicDecrypt({
[all …]
Dtest-crypto-dh.js7 const crypto = require('crypto'); constant
11 const dh1 = crypto.createDiffieHellman(common.hasFipsCrypto ? 1024 : 256);
13 const dh2 = crypto.createDiffieHellman(p1, 'buffer');
26 assert.throws(() => crypto.createDiffieHellman(13.37), {
33 assert.throws(() => crypto.createDiffieHellman('abcdef', 13.37), {
41 assert.throws(() => crypto.createDiffieHellman(bits), {
51 crypto.createDiffieHellman('abcdef', g);
52 crypto.createDiffieHellman('abcdef', 'hex', g);
61 assert.throws(() => crypto.createDiffieHellman('abcdef', g), ex);
62 assert.throws(() => crypto.createDiffieHellman('abcdef', 'hex', g), ex);
[all …]
Dtest-crypto-cipher-decipher.js10 const crypto = require('crypto'); constant
25 const cipher = crypto.createCipher('aes192', key);
33 const decipher = crypto.createDecipher('aes192', key);
43 const cStream = crypto.createCipher('aes192', key);
47 const dStream = crypto.createDecipher('aes192', key);
62 const cipher = crypto.createCipher('aes256', key);
69 const decipher = crypto.createDecipher('aes256', key);
83 const Cipher = crypto.Cipher;
84 const instance = crypto.Cipher('aes-256-cbc', 'secret');
89 () => crypto.createCipher(null),
[all …]
Dtest-crypto-random.js30 const crypto = require('crypto'); constant
41 [crypto.randomBytes, crypto.pseudoRandomBytes].forEach((f) => {
77 const after = crypto.randomFillSync(buf).toString('hex');
84 crypto.randomFillSync(buf);
98 crypto.randomFillSync(buf);
107 crypto.randomFill(buf, common.mustSucceed((buf) => {
116 crypto.randomFill(buf, common.mustSucceed((buf) => {
131 crypto.randomFill(buf, common.mustSucceed((buf) => {
141 crypto.randomFillSync(buf, 5, 5);
150 crypto.randomFillSync(buf, 5, 5);
[all …]
Dtest-crypto-scrypt.js8 const crypto = require('crypto'); constant
150 const actual = crypto.scryptSync(pass, salt, keylen, options);
152 crypto.scrypt(pass, salt, keylen, options, common.mustSucceed((actual) => {
163 assert.throws(() => crypto.scrypt('pass', 'salt', 1, options, () => {}),
165 assert.throws(() => crypto.scryptSync('pass', 'salt', 1, options),
175 assert.throws(() => crypto.scrypt('pass', 'salt', 1, options, () => {}),
177 assert.throws(() => crypto.scryptSync('pass', 'salt', 1, options),
183 const expected = crypto.scryptSync('pass', 'salt', 1, defaults);
184 const actual = crypto.scryptSync('pass', 'salt', 1);
186 crypto.scrypt('pass', 'salt', 1, common.mustSucceed((actual) => {
[all …]
Dtest-crypto-cipheriv-decipheriv.js7 const crypto = require('crypto'); constant
15 const cipher = crypto.createCipheriv('des-ede3-cbc', key, iv);
19 const decipher = crypto.createDecipheriv('des-ede3-cbc', key, iv);
30 const cStream = crypto.createCipheriv('des-ede3-cbc', key, iv);
34 const dStream = crypto.createDecipheriv('des-ede3-cbc', key, iv);
49 const cipher = crypto.createCipheriv('des-ede3-cbc', key, iv);
53 const decipher = crypto.createDecipheriv('des-ede3-cbc', key, iv);
67 const cipher = crypto.createCipheriv('id-aes128-wrap', key, iv);
73 const decipher = crypto.createDecipheriv('id-aes128-wrap', key, iv);
82 const Cipheriv = crypto.Cipheriv;
[all …]
Dtest-crypto-binary-default.js35 const crypto = require('crypto'); constant
66 const hmacHash = crypto.createHmac('sha1', 'Node')
222 let result = crypto.createHmac(hash, testCase.key)
350 crypto.createHmac('md5', testCase.key)
359 crypto.createHmac('sha1', testCase.key)
368 const a1 = crypto.createHash('sha1').update('Test123').digest('hex');
369 const a2 = crypto.createHash('sha256').update('Test123').digest('base64');
370 const a3 = crypto.createHash('sha512').update('Test123').digest(); // binary
371 const a4 = crypto.createHash('sha1').update('Test123').digest('buffer');
374 const a0 = crypto.createHash('md5').update('Test123').digest('latin1');
[all …]
Dtest-crypto.js35 const crypto = require('crypto'); constant
97 () => crypto.createHash('sha1').update({ foo: 'bar' }),
121 const cryptoCiphers = crypto.getCiphers();
122 assert(crypto.getCiphers().includes('aes-128-cbc'));
135 assert.notStrictEqual(crypto.getHashes().length, 0);
136 assert(crypto.getHashes().includes('sha1'));
137 assert(crypto.getHashes().includes('sha256'));
138 assert(!crypto.getHashes().includes('SHA1'));
139 assert(!crypto.getHashes().includes('SHA256'));
140 assert(crypto.getHashes().includes('RSA-SHA1'));
[all …]
Dtest-crypto-authenticated.js28 const crypto = require('crypto'); constant
31 crypto.DEFAULT_ENCODING = 'buffer';
49 const ciphers = crypto.getCiphers();
113 const encrypt = crypto.createCipheriv(test.algo,
135 crypto.createDecipheriv(test.algo,
141 const decrypt = crypto.createDecipheriv(test.algo,
164 assert.throws(() => { crypto.createCipher(test.algo, test.password); },
167 const encrypt = crypto.createCipher(test.algo, test.password, options);
183 assert.throws(() => { crypto.createDecipher(test.algo, test.password); },
186 const decrypt = crypto.createDecipher(test.algo, test.password, options);
[all …]
Dtest-crypto-hmac.js7 const crypto = require('crypto'); constant
10 const Hmac = crypto.Hmac;
11 const instance = crypto.Hmac('sha256', 'Node');
17 () => crypto.createHmac(null),
26 () => crypto.createHmac('sha256', 'key').digest({
35 () => crypto.createHmac('sha1', null),
54 ...(typeof key === 'string' ? [] : [crypto.createSecretKey]),
58 const hmac = crypto.createHmac(algo, keyWrapper(key));
270 const str = crypto.createHmac(hash, rfc4231[i].key);
273 let actual = crypto.createHmac(hash, rfc4231[i].key)
[all …]
Dtest-domain-crypto.js29 const crypto = require('crypto'); constant
37 crypto.randomBytes(8);
38 crypto.randomBytes(8, common.mustSucceed());
40 crypto.randomFillSync(buf);
41 crypto.pseudoRandomBytes(8);
42 crypto.pseudoRandomBytes(8, common.mustSucceed());
43 crypto.pbkdf2('password', 'salt', 8, 8, 'sha1', common.mustSucceed());
Dtest-crypto-stream.js29 const crypto = require('crypto'); constant
50 const hasher1 = crypto.createHash('md5');
60 crypto.createHash('md5').unpipe({});
61 crypto.createHash('md5').setEncoding('utf8');
62 crypto.createHash('md5').pause();
63 crypto.createHash('md5').resume();
70 const cipher = crypto.createCipheriv('aes-128-cbc', key, iv);
71 const decipher = crypto.createDecipheriv('aes-128-cbc', badkey, iv);
Dtest-crypto-update-encoding.js7 const crypto = require('crypto'); constant
13 const cipher = () => crypto.createCipheriv('aes-128-cbc', key, iv);
14 const decipher = () => crypto.createDecipheriv('aes-128-cbc', key, iv);
15 const hash = () => crypto.createSign('sha256');
16 const hmac = () => crypto.createHmac('sha256', key);
17 const sign = () => crypto.createSign('sha256');
18 const verify = () => crypto.createVerify('sha256');
/third_party/libwebsockets/minimal-examples/crypto/minimal-crypto-cose-key/
DCMakeLists.txt1 project(lws-crypto-cose-key C)
8 set(SAMP lws-crypto-cose-key)
18 add_test(NAME crypto-cose-key-1
19 COMMAND lws-crypto-cose-key --stdin set1.cks )
20 add_test(NAME crypto-cose-key-2
21 COMMAND lws-crypto-cose-key --kty EC2 --curve P-256 --kid ctest-256 --stdout ctest-ec-256.key)
22 add_test(NAME crypto-cose-key-3
23 COMMAND lws-crypto-cose-key --kty EC2 --curve P-384 --kid ctest-384 --stdout ctest-ec-384.key)
24 add_test(NAME crypto-cose-key-4
25 COMMAND lws-crypto-cose-key --kty EC2 --curve P-521 --kid ctest-512 --stdout ctest-ec-512.key)
[all …]
/third_party/openssl/crypto/err/
Dopenssl.ec6 L BN include/openssl/bn.h crypto/bn/bn_err.c
7 L RSA include/openssl/rsa.h crypto/rsa/rsa_err.c
8 L DH include/openssl/dh.h crypto/dh/dh_err.c
9 L EVP include/openssl/evp.h crypto/evp/evp_err.c
10 L BUF include/openssl/buffer.h crypto/buffer/buf_err.c
11 L OBJ include/openssl/objects.h crypto/objects/obj_err.c
12 L PEM include/openssl/pem.h crypto/pem/pem_err.c
13 L DSA include/openssl/dsa.h crypto/dsa/dsa_err.c
14 L X509 include/openssl/x509.h crypto/x509/x509_err.c
15 L ASN1 include/openssl/asn1.h crypto/asn1/asn1_err.c
[all …]
/third_party/grpc/
Dconfig.m4563 third_party/boringssl-with-bazel/src/crypto/asn1/a_bitstr.c \
564 third_party/boringssl-with-bazel/src/crypto/asn1/a_bool.c \
565 third_party/boringssl-with-bazel/src/crypto/asn1/a_d2i_fp.c \
566 third_party/boringssl-with-bazel/src/crypto/asn1/a_dup.c \
567 third_party/boringssl-with-bazel/src/crypto/asn1/a_enum.c \
568 third_party/boringssl-with-bazel/src/crypto/asn1/a_gentm.c \
569 third_party/boringssl-with-bazel/src/crypto/asn1/a_i2d_fp.c \
570 third_party/boringssl-with-bazel/src/crypto/asn1/a_int.c \
571 third_party/boringssl-with-bazel/src/crypto/asn1/a_mbstr.c \
572 third_party/boringssl-with-bazel/src/crypto/asn1/a_object.c \
[all …]
Dconfig.w32531 "third_party\\boringssl-with-bazel\\src\\crypto\\asn1\\a_bitstr.c " +
532 "third_party\\boringssl-with-bazel\\src\\crypto\\asn1\\a_bool.c " +
533 "third_party\\boringssl-with-bazel\\src\\crypto\\asn1\\a_d2i_fp.c " +
534 "third_party\\boringssl-with-bazel\\src\\crypto\\asn1\\a_dup.c " +
535 "third_party\\boringssl-with-bazel\\src\\crypto\\asn1\\a_enum.c " +
536 "third_party\\boringssl-with-bazel\\src\\crypto\\asn1\\a_gentm.c " +
537 "third_party\\boringssl-with-bazel\\src\\crypto\\asn1\\a_i2d_fp.c " +
538 "third_party\\boringssl-with-bazel\\src\\crypto\\asn1\\a_int.c " +
539 "third_party\\boringssl-with-bazel\\src\\crypto\\asn1\\a_mbstr.c " +
540 "third_party\\boringssl-with-bazel\\src\\crypto\\asn1\\a_object.c " +
[all …]
/third_party/node/test/sequential/
Dtest-crypto-timing-safe-equal.js7 const crypto = require('crypto'); constant
11 crypto.timingSafeEqual(Buffer.from('foo'), Buffer.from('foo')),
17 crypto.timingSafeEqual(Buffer.from('foo'), Buffer.from('bar')),
23 const buf = crypto.randomBytes(16).buffer;
30 assert.strictEqual(crypto.timingSafeEqual(left, right), true);
36 () => crypto.timingSafeEqual(Buffer.from([1, 2, 3]), Buffer.from([1, 2])),
45 () => crypto.timingSafeEqual('not a buffer', Buffer.from([1, 2])),
56 () => crypto.timingSafeEqual(Buffer.from([1, 2]), 'not a buffer'),

12345678910>>...24