From f2b1027238864b4bba38b87d1e505a51e24b3fef Mon Sep 17 00:00:00 2001 From: quadrismegistus Date: Mon, 7 Sep 2020 07:15:37 +0100 Subject: [PATCH] finally! abolishing private key property --- komrade/constants.py | 38 ++------------------------------------ 1 file changed, 2 insertions(+), 36 deletions(-) diff --git a/komrade/constants.py b/komrade/constants.py index 2988a3c..85ccc51 100644 --- a/komrade/constants.py +++ b/komrade/constants.py @@ -102,46 +102,12 @@ KEYMAKER_DEFAULT_KEY_TYPES = { WHY_MSG = 'Forge the password of memory: ' -OPERATOR_KEYCHAIN = {'pubkey': b'VUVDMgAAAC36lleQA/tL9ugZ8H1NQbZSiknwRG2ShzGaYWinTTq33FQMwMDw', 'privkey_decr': b'gh0tWDqsii3UzwntkoFL1qdJMYSJrR8mG2+0QO0Y0z8='} - -TELEPHONE_KEYCHAIN = {'pubkey_decr': b'fyzzwhnf1d8wLP/X9+hmnbYcZ09qChYjAFtXbPGdLbY=', 'privkey': b'UkVDMgAAAC0x3GnXAN03Ac7MjoqaHmdvw47DDRXwUiO25ZPe1Cx2zhGZmwPO'} -# import ujson as json -# from pythemis.scell import SCellSeal -# from base64 import b64decode,b64encode -# ## can I even hope to succeed? -# def get_builtin_keys(): -# with open(PATH_BUILTIN_KEYCHAINS_ENCR,'rb') as f_encr, open(PATH_BUILTIN_KEYCHAINS_DECR,'rb') as f_decr: -# builtin_keychains_b_encr_b64=f_encr.read() -# builtin_keychains_b_decr_b64=f_decr.read() -# builtin_keychains_b_encr=b64decode(builtin_keychains_b_encr_b64) -# builtin_keychains_b_decr=b64decode(builtin_keychains_b_decr_b64) +OPERATOR_KEYCHAIN = {'pubkey': b'VUVDMgAAAC0hPedHAvjx7ACxJpzwodDOEVoll7m/BPX+ru31YKQvDlayOX72', 'privkey_decr': b'LZIHOPSsBXUEhy0PpkZ8BhzljsOEkTq1P3GeypvI424='} -# builtin_keychains_b = SCellSeal(key=builtin_keychains_b_decr).decrypt(builtin_keychains_b_encr) -# builtin_keychains_s = builtin_keychains_b.decode('utf-8') -# builtin_keychains = json.loads(builtin_keychains_s) - -# # filter -# print(builtin_keychains) -# for name in builtin_keychains: -# for keyname in builtin_keychains[name]: -# v=builtin_keychains[name][keyname] -# builtin_keychains[name][keyname] = b64decode(v.encode('utf-8')) - -# return builtin_keychains - -# BUILTIN_KEYCHAIN = get_builtin_keys() -# if not BUILTIN_KEYCHAIN: -# raise Exception('where are the keys to the telephone and operator? how are we going to make any calls... smh') - -# # TELEPHONE_KEYCHAIN = BUILTIN_KEYCHAIN[TELEPHONE_NAME] -# # OPERATOR_KEYCHAIN = BUILTIN_KEYCHAIN[OPERATOR_NAME] +TELEPHONE_KEYCHAIN = {'pubkey_decr': b'd2X/aPs5BH3Q033/24waN4nG87WAQrKFLTNSzNaQqwo=', 'privkey': b'UkVDMgAAAC2pn4IKAEGZjouNdyc/nQRCnzlz0FmgxJXaxPqVVUoGJi/Xu763'} -# # print(TELEPHONE_KEYCHAIN) -# # print() -# # print(OPERATOR_KEYCHAIN) -# print(BUILTIN_KEYCHAIN) \ No newline at end of file