Module Import alias Import alias ImportFrom alias ImportFrom alias ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str decorator_list Call AttributeLoad NameLoad attr Str keyword Str Call AttributeLoad NameLoad attr Str keyword Str Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr BinOpMult Str Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Call AttributeLoad NameLoad attr Str keyword TupleLoad Str NameLoad Call AttributeLoad NameLoad attr Str keyword Str Call AttributeLoad NameLoad attr Str keyword Str Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr BinOpMult Str Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Call AttributeLoad NameLoad attr Str keyword TupleLoad Str NameLoad Call AttributeLoad NameLoad attr Str keyword Str Call AttributeLoad NameLoad attr Str keyword Str Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListComp Call NameLoad NameLoad comprehension NameStore Call NameLoad Num Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Slice Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad Call AttributeLoad NameLoad attr keyword Str keyword Str Call AttributeLoad NameLoad attr keyword Str keyword Str Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice Num BinOpAdd Num Num Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list Call AttributeLoad NameLoad attr Str keyword TupleLoad Str NameLoad Call AttributeLoad NameLoad attr Str keyword Str Call AttributeLoad NameLoad attr Str keyword Str Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign NameStore Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list Call AttributeLoad NameLoad attr Str keyword TupleLoad Str NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign NameStore Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list Call AttributeLoad NameLoad attr Str keyword TupleLoad Str NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore Str Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore Call NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr keyword Str keyword Str keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Num keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice Num Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice Num Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice Num Num Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice Num Num Expr Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list Call AttributeLoad NameLoad attr Str keyword Str Call AttributeLoad NameLoad attr Str keyword ListComp Call NameLoad NameLoad comprehension NameStore Call NameLoad Num Call AttributeLoad NameLoad attr Str keyword Str Call AttributeLoad NameLoad attr Str keyword Str Call AttributeLoad NameLoad attr Str keyword Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr NameLoad decorator_list Call AttributeLoad NameLoad attr Str keyword Str Call AttributeLoad NameLoad attr Str keyword Str Call AttributeLoad NameLoad attr Str keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad decorator_list Call AttributeLoad NameLoad attr Str keyword Str Call AttributeLoad NameLoad attr Str keyword Str Call AttributeLoad NameLoad attr Str keyword NameLoad decorator_list
N/A N/A hashlib N/A mock twisted.trial unittest oppy.crypto ntor NTorTest N/A N/A unittest TestCase N/A test_NTorState N/A N/A self mock_sk mock_b64 mock_dmi N/A N/A N/A mock_sk_g N/A N/A mock Mock N/A N/A mock_sk_g public_key pk N/A N/A mock_sk return_value mock_sk_g N/A N/A mock_sk public_key pk N/A mock_md N/A N/A mock Mock N/A N/A mock_md ntor_onion_key test N/A n N/A N/A ntor NTorState mock_md N/A N/A N/A mock_dmi assert_called_once_with mock_md N/A N/A N/A mock_b64 assert_called_once_with test N/A N/A N/A self assertEqual N/A mock_sk call_count 1 N/A N/A N/A self assertEqual N/A n relay_identity relay_identity N/A N/A N/A self assertEqual N/A n relay_ntor_onion_key ntor_onion_key N/A N/A N/A self assertEqual N/A n secret_key mock_sk_g N/A N/A N/A self assertEqual N/A n public_key pk N/A N/A N/A mock patch oppy.crypto.ntor.decodeMicrodescriptorIdentifier return_value relay_identity N/A N/A mock patch base64.b64decode return_value ntor_onion_key N/A N/A mock patch oppy.crypto.ntor.PrivateKey.generate test_createOnionSkin N/A N/A self N/A N/A N/A mock_nts N/A N/A mock Mock N/A N/A mock_nts relay_identity ident N/A N/A mock_nts relay_ntor_onion_key ntork N/A N/A mock_nts public_key pk N/A N/A N/A self assertEqual N/A N/A ntor createOnionSkin mock_nts identntorkpk N/A test_deriveRelayCrypto_buildSecreInput_bad N/A N/A self mock_mrc mock_cse mock_bai mock_mhs mock_bsi N/A N/A N/A mock_nts N/A N/A mock Mock N/A N/A mock_nts relay_identity ident N/A N/A mock_nts relay_ntor_onion_key ntork N/A N/A mock_nts public_key pk N/A mock_cell N/A N/A mock Mock N/A N/A mock_cell hdata N/A 96 N/A N/A N/A self assertRaises N/A ntor KeyDerivationFailed N/A ntor deriveRelayCrypto mock_nts mock_cell N/A N/A N/A mock patch oppy.crypto.ntor._buildSecretInput return_value N/A secret True N/A N/A mock patch oppy.crypto.util.makeHMACSHA256 return_value hmac N/A N/A mock patch oppy.crypto.ntor._buildAuthInput return_value auth N/A N/A mock patch oppy.crypto.util.constantStrEqual return_value False N/A N/A mock patch oppy.crypto.ntor._makeRelayCrypto return_value ret test_deriveRelayCrypto_auth_bad N/A N/A self mock_mrc mock_cse mock_bai mock_mhs mock_bsi N/A N/A N/A mock_nts N/A N/A mock Mock N/A N/A mock_nts relay_identity ident N/A N/A mock_nts relay_ntor_onion_key ntork N/A N/A mock_nts public_key pk N/A mock_cell N/A N/A mock Mock N/A N/A mock_cell hdata N/A 96 N/A N/A N/A self assertRaises N/A ntor KeyDerivationFailed N/A ntor deriveRelayCrypto mock_nts mock_cell N/A N/A N/A mock patch oppy.crypto.ntor._buildSecretInput return_value N/A secret False N/A N/A mock patch oppy.crypto.util.makeHMACSHA256 return_value hmac N/A N/A mock patch oppy.crypto.ntor._buildAuthInput return_value auth N/A N/A mock patch oppy.crypto.util.constantStrEqual return_value True N/A N/A mock patch oppy.crypto.ntor._makeRelayCrypto return_value ret test_deriveRelayCrypto_ok N/A N/A self mock_mrc mock_cse mock_bai mock_mhs mock_bsi N/A N/A N/A mock_nts N/A N/A mock Mock N/A N/A mock_nts relay_identity ident N/A N/A mock_nts relay_ntor_onion_key ntork N/A N/A mock_nts public_key pk N/A mock_cell N/A N/A mock Mock N/A N/A mock_cell hdata N/A N/A chr i N/A i N/A range 96 N/A hdata N/A mock_cell hdata N/A ret N/A N/A ntor deriveRelayCrypto mock_nts mock_cell N/A N/A N/A mock_bsi assert_called_once_with mock_nts N/A hdata N/A 32 N/A N/A N/A self assertEqual N/A mock_mhs call_count 2 N/A N/A N/A self assertEqual N/A mock_mhs call_args_list N/A N/A N/A mock call msg secret key ntor-curve25519-sha256-1:verify N/A N/A mock call msg auth key ntor-curve25519-sha256-1:mac N/A N/A N/A mock_cse assert_called_once_with N/A hdata N/A 32 N/A 32 20 hmac N/A N/A N/A mock_mrc assert_called_once_with secret N/A N/A N/A self assertEqual ret ret N/A N/A N/A mock patch oppy.crypto.ntor._buildSecretInput return_value N/A secret False N/A N/A mock patch oppy.crypto.util.makeHMACSHA256 return_value hmac N/A N/A mock patch oppy.crypto.ntor._buildAuthInput return_value auth N/A N/A mock patch oppy.crypto.util.constantStrEqual return_value False N/A N/A mock patch oppy.crypto.ntor._makeRelayCrypto return_value ret test_buildSecretInput_bad_EXP N/A N/A self mock_exp N/A N/A N/A mock_nts N/A N/A mock Mock N/A N/A mock_nts relay_identity ident N/A N/A mock_nts relay_ntor_onion_key ntork N/A N/A mock_nts public_key pk N/A relay_pk relay_pk N/A N/A v b N/A N/A ntor _buildSecretInput mock_nts relay_pk N/A N/A N/A self assertTrue b N/A N/A N/A mock patch oppy.crypto.ntor._EXP return_value N/A True test_buildAuthInput N/A N/A self mock_exp N/A N/A N/A mock_nts N/A N/A mock Mock N/A N/A mock_nts relay_identity ident N/A N/A mock_nts relay_ntor_onion_key ntork N/A N/A mock_nts public_key pk N/A relay_pk relay_pk N/A N/A v b N/A N/A ntor _buildSecretInput mock_nts relay_pk N/A N/A N/A self assertEqual N/A mock_exp call_count 2 N/A N/A N/A self assertFalse b N/A N/A N/A self assertEqual v expexpidentntorkpkrelay_pkntor-curve25519-sha256-1 N/A N/A N/A mock patch oppy.crypto.ntor._EXP return_value N/A exp False test_makeRelayCrypto N/A N/A self mock_rc mock_maes mock_sha1 mock_hexp mock_hext N/A N/A N/A secret_input secret input N/A km N/A N/A chr i N/A i N/A range 96 N/A ret N/A N/A ntor _makeRelayCrypto secret_input N/A N/A N/A mock_hext assert_called_once_with salt ntor-curve25519-sha256-1:key_extract input_key_material secret input hash N/A hashlib sha256 N/A N/A N/A mock_hexp assert_called_once_with pseudo_random_key prk info ntor-curve25519-sha256-1:key_expand length 72 hash N/A hashlib sha256 N/A N/A N/A self assertEqual N/A mock_sha1 call_count 2 N/A N/A N/A self assertEqual N/A mock_sha1 call_args_list N/A N/A N/A mock call N/A km N/A 20 N/A N/A mock call N/A km N/A 20 40 N/A N/A N/A self assertEqual N/A mock_maes call_count 2 N/A N/A N/A self assertEqual N/A mock_maes call_args_list N/A N/A N/A mock call N/A km N/A 40 56 N/A N/A mock call N/A km N/A 56 72 N/A N/A N/A mock_rc assert_called_once_with forward_cipher cipher forward_digest sha1 backward_cipher cipher backward_digest sha1 N/A N/A N/A self assertEqual ret ret N/A N/A N/A mock patch hkdf.hkdf_extract return_value prk N/A N/A mock patch hkdf.hkdf_expand return_value N/A N/A chr i N/A i N/A range 96 N/A N/A mock patch hashlib.sha1 return_value sha1 N/A N/A mock patch oppy.crypto.util.makeAES128CTRCipher return_value cipher N/A N/A mock patch oppy.crypto.util.RelayCrypto return_value ret test_EXP_bad N/A N/A self mock_az mock_pk mock_csm N/A N/A N/A N/A ret bad N/A N/A ntor _EXP n p N/A N/A N/A mock_pk assert_called_once_with p N/A N/A N/A mock_csm assert_called_once_with n pk N/A N/A N/A self assertTrue bad N/A N/A N/A mock patch nacl.bindings.crypto_scalarmult return_value sm N/A N/A mock patch oppy.crypto.ntor.PublicKey return_value pk N/A N/A mock patch oppy.crypto.util.constantStrAllZero return_value True test_EXP N/A N/A self mock_az mock_pk mock_csm N/A N/A N/A N/A ret bad N/A N/A ntor _EXP n p N/A N/A N/A mock_pk assert_called_once_with p N/A N/A N/A mock_csm assert_called_once_with n pk N/A N/A N/A mock_az assert_called_once_with sm N/A N/A N/A self assertEqual ret sm N/A N/A N/A self assertFalse bad N/A N/A N/A mock patch nacl.bindings.crypto_scalarmult return_value sm N/A N/A mock patch oppy.crypto.ntor.PublicKey return_value pk N/A N/A mock patch oppy.crypto.util.constantStrAllZero return_value False N/A