ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 13 Dec 2023 21:28:48 +0100Where does sagemath's speed in calculating gcd come from?https://ask.sagemath.org/question/74828/where-does-sagemaths-speed-in-calculating-gcd-come-from/ Hey,
I was wondering how can sagemath can calculate gcds without calculating the numbers at stake?
For instance,
sage: from Crypto.Util.number import long_to_bytes, inverse, bytes_to_long
sage: from Crypto.Hash import SHA256
sage: e = 65537
sage: gcd(bytes_to_long(SHA256.new(data=b'first').digest())^e-35211653423, bytes_to_long(SHA256.new(data=b'second').digest())^e-156535482153)
is computed nearly instantly while it will take forever for sage to calculate `bytes_to_long(SHA256.new(data=b'first').digest())^e`.
Is it perhaps part of symbolic computation?
Thanks :)MonappWed, 13 Dec 2023 21:28:48 +0100https://ask.sagemath.org/question/74828/