From 5ae11d3225241308e1a975207b868de00f491317 Mon Sep 17 00:00:00 2001 From: neptunia Date: Fri, 17 Mar 2017 19:32:40 -0400 Subject: [PATCH] push --- premium-rsa/grader.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/premium-rsa/grader.py b/premium-rsa/grader.py index dda114c..c7be286 100644 --- a/premium-rsa/grader.py +++ b/premium-rsa/grader.py @@ -76,10 +76,11 @@ def get_problem(random): def generate_ciphertext(random): n, e, cut, deez, salt = get_problem(random) encoded = int(("easyctf{%s%s}" % (flag, salt)).encode('hex'),16) - ciphertext = 'n: '+str(n)+'\n' - ciphertext += 'e: '+str(e)+'\n' + ciphertext = 'n: '+hex(n))+'\n' + ciphertext += 'e: '+hex(e)+'\n' ciphertext += 'd: [??? '+str(cut)+' REDACTED BITS ???]'+str(deez)+'\n' - ciphertext += 'c: '+str(pow(encoded, e, n))+'\n' + ciphertext += 'c: '+hex(pow(encoded, e, n))+'\n' + return StringIO(ciphertext)