I'm working on solving a encryption task, and I'm a bit stuck. I want to clarify that I'm only seeking hints and not direct answers since I want to solve it myself. The goal is to solve it on my own; otherwise, it wouldn't make sense. Therefore, I'm just looking for hints to help me progress from where I'm stuck or any comments suggesting that I might be missing an aspect or something.
The task started with an image that had text in the background. From the information in the background of the image, I managed to obtain N, e, d, p, and q related to RSA encryption. There are also two formulas for a variable called "key." One formula is based on d and N, which I have. The other formula is a condition that should be satisfied, and my results reveal that it is satisfied.
There is also a given hint about a value of c, which is c = d7a7e396df976cf6c59adce5d1381ea020a35af126efd0d5d380e4ccb74758e0f05e86a0bed61ac75d5a1dfd029c8792ced99c5abf33354505e288f0b9bda280c9099506be3c3ee818b5e405e1fbf45903708cd067cafa34aa5f5b88958ae6603b4a427ab2
.
Additionally, it is mentioned that m = decrypt(sha256("%d" % key), c)
, and this is where I'm primarily stuck. I'm coding in Python, and that's where I've made the most progress so far. I've coded two separate programs: one that encrypts text using the public key and another program that decrypts the text using the calculated private key. It works, and I can encrypt and decrypt text with the values I have. I'm just stuck regarding m = decrypt(sha256("%d" % key), c)
. Maybe there are some steps I'm overlooking or missing information?
I hope someone can provide a comment or hint on what considerations I should make.