问题
I have this encryption code, but I am unsure how to invert the modulus used in the code:
from PIL import Image
flag = Image.open(r"flag.png")
img = array(flag)
key = [41, 37, 23]
a, b, c = img.shape
for x in range (0, a):
for y in range (0, b):
pixel = img[x, y]
for i in range(0,3):
pixel[i] = pixel[i] * key[i] % 251
img[x][y] = pixel
enc = Image.fromarray(img)
enc.save('enc.png')
来源:https://stackoverflow.com/questions/60696879/i-have-an-encryption-algorithm-but-i-am-unsure-how-to-reverse-the-modulus-that