/external/python/cryptography/tests/hazmat/primitives/ |
D | utils.py | 67 actual_ciphertext = encryptor.update(binascii.unhexlify(plaintext)) 69 assert actual_ciphertext == binascii.unhexlify(ciphertext) 71 actual_plaintext = decryptor.update(binascii.unhexlify(ciphertext)) 73 assert actual_plaintext == binascii.unhexlify(plaintext) 109 cipher_factory(binascii.unhexlify(params["key"])), 111 binascii.unhexlify(params["iv"]), 112 binascii.unhexlify(params["tag"]), 113 len(binascii.unhexlify(params["tag"])), 118 decryptor.authenticate_additional_data(binascii.unhexlify(aad)) 119 actual_plaintext = decryptor.update(binascii.unhexlify(ciphertext)) [all …]
|
D | test_concatkdf.py | 38 prk = binascii.unhexlify( 42 okm = binascii.unhexlify(b"1c3bc9e7c4547c5191c0d478cccaed55") 44 oinfo = binascii.unhexlify( 54 prk = binascii.unhexlify( 58 okm = binascii.unhexlify(b"1c3bc9e7c4547c5191c0d478cccaed55") 60 oinfo = binascii.unhexlify( 70 prk = binascii.unhexlify( 74 okm = binascii.unhexlify(b"1c3bc9e7c4547c5191c0d478cccaed55") 76 oinfo = binascii.unhexlify( 86 prk = binascii.unhexlify( [all …]
|
D | test_3des.py | 41 lambda keys, **kwargs: algorithms.TripleDES(binascii.unhexlify(keys)), 42 lambda iv, **kwargs: modes.CBC(binascii.unhexlify(iv)), 50 binascii.unhexlify(key1 + key2 + key3) 52 lambda iv, **kwargs: modes.CBC(binascii.unhexlify(iv)), 74 lambda keys, **kwargs: algorithms.TripleDES(binascii.unhexlify(keys)), 75 lambda iv, **kwargs: modes.OFB(binascii.unhexlify(iv)), 83 binascii.unhexlify(key1 + key2 + key3) 85 lambda iv, **kwargs: modes.OFB(binascii.unhexlify(iv)), 107 lambda keys, **kwargs: algorithms.TripleDES(binascii.unhexlify(keys)), 108 lambda iv, **kwargs: modes.CFB(binascii.unhexlify(iv)), [all …]
|
D | test_ciphers.py | 40 cipher = AES(binascii.unhexlify(key)) 45 AES(binascii.unhexlify(b"0" * 12)) 88 cipher = Camellia(binascii.unhexlify(key)) 93 Camellia(binascii.unhexlify(b"0" * 12)) 103 cipher = TripleDES(binascii.unhexlify(key)) 108 TripleDES(binascii.unhexlify(b"0" * 12)) 121 cipher = Blowfish(binascii.unhexlify(key)) 126 Blowfish(binascii.unhexlify(b"0" * 6)) 139 cipher = CAST5(binascii.unhexlify(key)) 144 CAST5(binascii.unhexlify(b"0" * 34)) [all …]
|
D | test_aes_gcm.py | 43 key = binascii.unhexlify(b"5211242698bed4774a090620a6ca56f3") 44 iv = binascii.unhexlify(b"b1e1349120b6e832ef976f5d") 45 aad = binascii.unhexlify(b"b6d729aab8e6416d7002b9faa794c410d8d2f193") 46 tag = binascii.unhexlify(b"0f247e7f9c2505de374006738018493b") 57 key = binascii.unhexlify(b"e98b72a9881a84ca6b76e0f43e68647a") 58 iv = binascii.unhexlify(b"8b23299fde174053f3d652ba") 59 ct = binascii.unhexlify(b"5a3c1cf1985dbb8bed818036fdd5ab42") 60 tag = binascii.unhexlify(b"23c7ab0f952b7091cd324835043b5eb5") 61 pt = binascii.unhexlify(b"28286a321293253c3e0aa2704a278032") 120 key = binascii.unhexlify(b"5211242698bed4774a090620a6ca56f3") [all …]
|
D | test_aes.py | 45 key = binascii.unhexlify(vector["key"]) 46 tweak = binascii.unhexlify(vector["i"]) 47 pt = binascii.unhexlify(vector["pt"]) 48 ct = binascii.unhexlify(vector["ct"]) 86 lambda key, **kwargs: algorithms.AES(binascii.unhexlify(key)), 87 lambda iv, **kwargs: modes.CBC(binascii.unhexlify(iv)), 119 lambda key, **kwargs: algorithms.AES(binascii.unhexlify(key)), 152 lambda key, **kwargs: algorithms.AES(binascii.unhexlify(key)), 153 lambda iv, **kwargs: modes.OFB(binascii.unhexlify(iv)), 185 lambda key, **kwargs: algorithms.AES(binascii.unhexlify(key)), [all …]
|
D | test_hkdf.py | 110 ikm = binascii.unhexlify(vector["ikm"]) 112 assert hkdf.derive(ikm) == binascii.unhexlify(vector["okm"]) 125 ikm = bytearray(binascii.unhexlify(vector["ikm"])) 127 assert hkdf.derive(ikm) == binascii.unhexlify(vector["okm"]) 133 prk = binascii.unhexlify( 142 info = binascii.unhexlify(b"f0f1f2f3f4f5f6f7f8f9") 149 binascii.unhexlify( 160 info = binascii.unhexlify(b"f0f1f2f3f4f5f6f7f8f9") 166 prk = binascii.unhexlify( 175 info = binascii.unhexlify(b"f0f1f2f3f4f5f6f7f8f9") [all …]
|
D | test_keywrap.py | 38 wrapping_key = binascii.unhexlify(params["k"]) 39 key_to_wrap = binascii.unhexlify(params["p"]) 59 wrapping_key = binascii.unhexlify(params["k"]) 60 wrapped_key = binascii.unhexlify(params["c"]) 137 wrapping_key = binascii.unhexlify(params["k"]) 138 key_to_wrap = binascii.unhexlify(params["p"]) 149 wrapping_key = binascii.unhexlify(params["key"]) 150 key_to_wrap = binascii.unhexlify(params["input"]) 154 assert wrapped_key == binascii.unhexlify(params["output"]) 165 wrapping_key = binascii.unhexlify(params["k"]) [all …]
|
D | test_aead.py | 133 key = binascii.unhexlify(vector["key"]) 134 nonce = binascii.unhexlify(vector["iv"]) 135 aad = binascii.unhexlify(vector["aad"]) 136 tag = binascii.unhexlify(vector["tag"]) 137 pt = binascii.unhexlify(vector["plaintext"]) 138 ct = binascii.unhexlify(vector["ciphertext"]) 157 key = binascii.unhexlify(vector["key"]) 158 nonce = binascii.unhexlify(vector["nonce"]) 162 aad = binascii.unhexlify(vector["ad"]) 163 tag = binascii.unhexlify(vector["tag"]) [all …]
|
D | test_x963kdf.py | 36 key = binascii.unhexlify( 40 derivedkey = binascii.unhexlify(b"443024c3dae66b95e6f5670601558f71") 48 binascii.unhexlify( 53 derivedkey = binascii.unhexlify(b"443024c3dae66b95e6f5670601558f71") 60 key = binascii.unhexlify( 64 sharedinfo = binascii.unhexlify(b"75eef81aa3041e33b80971203d2c0c52") 66 derivedkey = binascii.unhexlify( 78 key = binascii.unhexlify(
|
D | test_cmac.py | 66 cmac = CMAC(AES(binascii.unhexlify(key)), backend) 67 cmac.update(binascii.unhexlify(message)) 82 cmac = CMAC(AES(binascii.unhexlify(key)), backend) 83 cmac.update(binascii.unhexlify(message)) 84 assert cmac.verify(binascii.unhexlify(output)) is None 103 cmac = CMAC(TripleDES(binascii.unhexlify(key)), backend) 104 cmac.update(binascii.unhexlify(message)) 124 cmac = CMAC(TripleDES(binascii.unhexlify(key)), backend) 125 cmac.update(binascii.unhexlify(message)) 126 assert cmac.verify(binascii.unhexlify(output)) is None [all …]
|
D | test_camellia.py | 35 lambda key, **kwargs: algorithms.Camellia(binascii.unhexlify(key)), 52 lambda key, **kwargs: algorithms.Camellia(binascii.unhexlify(key)), 53 lambda iv, **kwargs: modes.CBC(binascii.unhexlify(iv)), 69 lambda key, **kwargs: algorithms.Camellia(binascii.unhexlify(key)), 70 lambda iv, **kwargs: modes.OFB(binascii.unhexlify(iv)), 86 lambda key, **kwargs: algorithms.Camellia(binascii.unhexlify(key)), 87 lambda iv, **kwargs: modes.CFB(binascii.unhexlify(iv)),
|
D | test_seed.py | 31 lambda key, **kwargs: algorithms.SEED(binascii.unhexlify((key))), 48 lambda key, **kwargs: algorithms.SEED(binascii.unhexlify((key))), 49 lambda iv, **kwargs: modes.CBC(binascii.unhexlify(iv)), 65 lambda key, **kwargs: algorithms.SEED(binascii.unhexlify((key))), 66 lambda iv, **kwargs: modes.OFB(binascii.unhexlify(iv)), 82 lambda key, **kwargs: algorithms.SEED(binascii.unhexlify((key))), 83 lambda iv, **kwargs: modes.CFB(binascii.unhexlify(iv)),
|
D | test_idea.py | 31 lambda key, **kwargs: algorithms.IDEA(binascii.unhexlify((key))), 48 lambda key, **kwargs: algorithms.IDEA(binascii.unhexlify((key))), 49 lambda iv, **kwargs: modes.CBC(binascii.unhexlify(iv)), 65 lambda key, **kwargs: algorithms.IDEA(binascii.unhexlify((key))), 66 lambda iv, **kwargs: modes.OFB(binascii.unhexlify(iv)), 82 lambda key, **kwargs: algorithms.IDEA(binascii.unhexlify((key))), 83 lambda iv, **kwargs: modes.CFB(binascii.unhexlify(iv)),
|
D | test_blowfish.py | 31 lambda key, **kwargs: algorithms.Blowfish(binascii.unhexlify(key)), 48 lambda key, **kwargs: algorithms.Blowfish(binascii.unhexlify(key)), 49 lambda iv, **kwargs: modes.CBC(binascii.unhexlify(iv)), 65 lambda key, **kwargs: algorithms.Blowfish(binascii.unhexlify(key)), 66 lambda iv, **kwargs: modes.OFB(binascii.unhexlify(iv)), 82 lambda key, **kwargs: algorithms.Blowfish(binascii.unhexlify(key)), 83 lambda iv, **kwargs: modes.CFB(binascii.unhexlify(iv)),
|
D | test_cast5.py | 31 lambda key, **kwargs: algorithms.CAST5(binascii.unhexlify((key))), 48 lambda key, **kwargs: algorithms.CAST5(binascii.unhexlify((key))), 49 lambda iv, **kwargs: modes.CBC(binascii.unhexlify(iv)), 65 lambda key, **kwargs: algorithms.CAST5(binascii.unhexlify((key))), 66 lambda iv, **kwargs: modes.OFB(binascii.unhexlify(iv)), 82 lambda key, **kwargs: algorithms.CAST5(binascii.unhexlify((key))), 83 lambda iv, **kwargs: modes.CFB(binascii.unhexlify(iv)),
|
/external/python/cryptography/tests/wycheproof/ |
D | test_rsa.py | 69 binascii.unhexlify(wycheproof.testgroup["keyDer"]), backend 80 binascii.unhexlify(wycheproof.testcase["sig"]), 81 binascii.unhexlify(wycheproof.testcase["msg"]), 88 binascii.unhexlify(wycheproof.testcase["sig"]), 89 binascii.unhexlify(wycheproof.testcase["msg"]), 105 binascii.unhexlify(wycheproof.testcase["msg"]), 109 assert sig == binascii.unhexlify(wycheproof.testcase["sig"]) 126 binascii.unhexlify(wycheproof.testgroup["keyDer"]), backend 141 binascii.unhexlify(wycheproof.testcase["sig"]), 142 binascii.unhexlify(wycheproof.testcase["msg"]), [all …]
|
D | test_aes.py | 23 key = binascii.unhexlify(wycheproof.testcase["key"]) 24 iv = binascii.unhexlify(wycheproof.testcase["iv"]) 25 msg = binascii.unhexlify(wycheproof.testcase["msg"]) 26 ct = binascii.unhexlify(wycheproof.testcase["ct"]) 51 key = binascii.unhexlify(wycheproof.testcase["key"]) 52 iv = binascii.unhexlify(wycheproof.testcase["iv"]) 53 aad = binascii.unhexlify(wycheproof.testcase["aad"]) 54 msg = binascii.unhexlify(wycheproof.testcase["msg"]) 55 ct = binascii.unhexlify(wycheproof.testcase["ct"]) 56 tag = binascii.unhexlify(wycheproof.testcase["tag"]) [all …]
|
D | test_eddsa.py | 27 binascii.unhexlify(wycheproof.testgroup["key"]["pk"]) 32 binascii.unhexlify(wycheproof.testcase["sig"]), 33 binascii.unhexlify(wycheproof.testcase["msg"]), 38 binascii.unhexlify(wycheproof.testcase["sig"]), 39 binascii.unhexlify(wycheproof.testcase["msg"]), 50 binascii.unhexlify(wycheproof.testgroup["key"]["pk"]) 55 binascii.unhexlify(wycheproof.testcase["sig"]), 56 binascii.unhexlify(wycheproof.testcase["msg"]), 61 binascii.unhexlify(wycheproof.testcase["sig"]), 62 binascii.unhexlify(wycheproof.testcase["msg"]),
|
D | test_hmac.py | 47 key=binascii.unhexlify(wycheproof.testcase["key"]), 51 h.update(binascii.unhexlify(wycheproof.testcase["msg"])) 55 h.verify(binascii.unhexlify(wycheproof.testcase["tag"])) 58 assert tag == binascii.unhexlify(wycheproof.testcase["tag"]) 61 key=binascii.unhexlify(wycheproof.testcase["key"]), 65 h.update(binascii.unhexlify(wycheproof.testcase["msg"])) 66 h.verify(binascii.unhexlify(wycheproof.testcase["tag"]))
|
D | test_hkdf.py | 36 salt=binascii.unhexlify(wycheproof.testcase["salt"]), 37 info=binascii.unhexlify(wycheproof.testcase["info"]), 45 salt=binascii.unhexlify(wycheproof.testcase["salt"]), 46 info=binascii.unhexlify(wycheproof.testcase["info"]), 49 result = h.derive(binascii.unhexlify(wycheproof.testcase["ikm"])) 50 assert result == binascii.unhexlify(wycheproof.testcase["okm"])
|
D | test_chacha20poly1305.py | 25 key = binascii.unhexlify(wycheproof.testcase["key"]) 26 iv = binascii.unhexlify(wycheproof.testcase["iv"]) 27 aad = binascii.unhexlify(wycheproof.testcase["aad"]) 28 msg = binascii.unhexlify(wycheproof.testcase["msg"]) 29 ct = binascii.unhexlify(wycheproof.testcase["ct"]) 30 tag = binascii.unhexlify(wycheproof.testcase["tag"])
|
D | test_keywrap.py | 18 wrapping_key = binascii.unhexlify(wycheproof.testcase["key"]) 19 key_to_wrap = binascii.unhexlify(wycheproof.testcase["msg"]) 20 expected = binascii.unhexlify(wycheproof.testcase["ct"]) 43 wrapping_key = binascii.unhexlify(wycheproof.testcase["key"]) 44 key_to_wrap = binascii.unhexlify(wycheproof.testcase["msg"]) 45 expected = binascii.unhexlify(wycheproof.testcase["ct"])
|
/external/python/cryptography/docs/development/custom-vectors/arc4/ |
D | verify_arc4.go | 14 func unhexlify(s string) []byte { func 81 unhexlify(vector.key), 82 unhexlify(vector.plaintext), 83 unhexlify(vector.ciphertext)) 102 unhexlify(vector.key), 103 unhexlify(vector.plaintext), 104 unhexlify(vector.ciphertext))
|
/external/python/cpython2/Lib/test/ |
D | test_hashlib.py | 19 from binascii import unhexlify 412 (unhexlify('0c60c80f961f0e71f3a9b524af6012062fe037a6'), None), 413 (unhexlify('ea6c014dc72d6f8ccd1ed92ace1d41f0d8de8957'), None), 414 (unhexlify('4b007901b765489abead49d926f721d065a429c1'), None), 416 (unhexlify('3d2eec4fe41c849b80c8d83662c0e44a8b291a964c' 418 (unhexlify('56fa6aa75548099dcc37d7f03425e0c3'), None),], 420 (unhexlify('120fb6cffcf8b32c43e7225256c4f837' 422 (unhexlify('ae4d0c95af6b46d32d0adff928f06dd0' 424 (unhexlify('c5e478d59288c841aa530db6845c4c8d' 428 (unhexlify('348c89dbcbd32b2f32d814b8116e84cf2b17' [all …]
|