Change in pysim[master]: pySim/utils.py: Attempt to support pycryptodpme

laforge gerrit-no-reply at lists.osmocom.org
Fri Mar 5 20:39:22 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/23259 )

Change subject: pySim/utils.py: Attempt to support pycryptodpme
......................................................................

pySim/utils.py: Attempt to support pycryptodpme

This should resolve the following error when using with pycryptodome
instead of pycrypto:

TypeError: new() missing 1 required positional argument: 'mode'

Change-Id: Ibd3ca00d62b864909f5e89e0feb350268157a4ca
Related: OS#5060
---
M pySim/utils.py
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  laforge: Looks good to me, approved
  fixeria: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/pySim/utils.py b/pySim/utils.py
index 13e62f0..f7190d4 100644
--- a/pySim/utils.py
+++ b/pySim/utils.py
@@ -246,7 +246,7 @@
 	# We pass in hex string and now need to work on bytes
 	ki_bytes = bytes(h2b(ki_hex))
 	op_bytes = bytes(h2b(op_hex))
-	aes = AES.new(ki_bytes)
+	aes = AES.new(ki_bytes, AES.MODE_ECB)
 	opc_bytes = aes.encrypt(op_bytes)
 	return b2h(strxor(opc_bytes, op_bytes))
 

-- 
To view, visit https://gerrit.osmocom.org/c/pysim/+/23259
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ibd3ca00d62b864909f5e89e0feb350268157a4ca
Gerrit-Change-Number: 23259
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210305/4a931a8f/attachment.htm>


More information about the gerrit-log mailing list