def checkChallenge(self, originalChallenge, cipheredChallenge, crypto_v1=0):
     if crypto_v1:
         from agents.CryptoLib_v1 import crypto, CryptoLib, aggregatorKey, aes_decrypt
     else:
         from agents.CryptoLib import crypto, CryptoLib, aggregatorKey, aes_decrypt
     # get cryptolib instance
     crypt = CryptoLib()
     return crypt.verifySignatureRSA(originalChallenge, cipheredChallenge, self.public_key(crypto_v1))
Exemple #2
0
 def checkChallenge(self,
                    originalChallenge,
                    cipheredChallenge,
                    crypto_v1=0):
     if crypto_v1:
         from agents.CryptoLib_v1 import crypto, CryptoLib, aggregatorKey, aes_decrypt
     else:
         from agents.CryptoLib import crypto, CryptoLib, aggregatorKey, aes_decrypt
     # get cryptolib instance
     crypt = CryptoLib()
     return crypt.verifySignatureRSA(originalChallenge, cipheredChallenge,
                                     self.public_key(crypto_v1))