-
Notifications
You must be signed in to change notification settings - Fork 0
/
code_1.py
163 lines (116 loc) · 14.8 KB
/
code_1.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
from PIL import Image
import lzma
from Crypto.Cipher import AES, DES3, PKCS1_OAEP
from Crypto.PublicKey import RSA
from stegano import lsbset, lsb
from stegano.lsbset import generators
# Randomizer byte number function
def get_bytes(n):
random_number = 1000
return random_number.to_bytes(n, "big")
# Global Variables for Layer 1 - RSA
rsa_public_key = RSA.import_key(open("keys/rsa_public_key.pem").read())
rsa_private_key = RSA.import_key(open("keys/rsa_private_key.pem").read())
rsa_encryptor = PKCS1_OAEP.new(rsa_public_key, randfunc=get_bytes)
rsa_decryptor = PKCS1_OAEP.new(rsa_private_key)
# Global Variables for Layer 2 - AES
with open("keys/aes_key.pem", "rb") as p:
aes_key = p.read()
aes_encryptor = AES.new(aes_key, AES.MODE_EAX, nonce=b"123456")
aes_decryptor = AES.new(aes_key, AES.MODE_EAX, aes_encryptor.nonce)
# Global Variables for Layer 3 - 3DES
with open("keys/des3_key.pem", "rb") as p:
des_key = p.read()
des_encryptor = DES3.new(des_key, DES3.MODE_EAX, nonce=b"123456")
des_decryptor = DES3.new(des_key, DES3.MODE_EAX, des_encryptor.nonce)
# Double Encryption Function
def encrypt(plaintext):
# Generating ciphertext by passing through layer 1 using plaintext as input
print(len(plaintext[0:10]), plaintext[0:10])
ciphertext = rsa_encryptor.encrypt(plaintext[0:10])
print(len(ciphertext))
print('\nLayer 1 RSA Ciphertext: ')
# print(ciphertext)
# Generating ciphertext by passing through layer 2 using ciphertext from layer 1 as input
ciphertext = aes_encryptor.encrypt(b"".join([ciphertext, plaintext]))
print('\n\nLayer 2 AES Ciphertext: ')
# print(ciphertext)
# Generating ciphertext by passing through layer 3 using ciphertext from layer 2 as input
ciphertext = des_encryptor.encrypt(ciphertext)
print('\n\nLayer 3 3DES Ciphertext: ')
# print(ciphertext)
# Returning Ciphertext to called function
return ciphertext
# Embedding text in a cover image using LSB technique
def hide(ciphertext, im1, im1Secr1):
# Embedding ciphertext using Steganography using LSB technique
embedded_image = lsb.hide(im1, str(ciphertext))
# Saving the image as coverImageSecret.png with the embedded ciphertext
embedded_image.save(im1Secr1)
# Revealing hidden text from the steganographic image
def reveal(im1Secr1):
# Revealing the hidden ciphertext from coverImageSecret.png
ciphertext = lsb.reveal(im1Secr1)
# Encoding the ciphertext to Byte format for decryption
ciphertext = (
ciphertext[2:-1].encode().decode("unicode_escape").encode("raw_unicode_escape")
)
return ciphertext
# Double Decryption Function
def decrypt(ciphertext):
# Generating plaintext by passing through layer 3 using ciphertext as input
plaintext = des_decryptor.decrypt(ciphertext)
# Generating plaintext by passing through layer 2 using plaintext from layer 3 as input
plaintext = aes_decryptor.decrypt(plaintext)
rest = plaintext[129:]
print(plaintext[-9:], len(plaintext[-9:]))
# Generating plaintext by passing through layer 1 using plaintext from layer 2 as input
plaintext = rsa_decryptor.decrypt(plaintext[0:128])
plaintext = plaintext + rest
print(len(plaintext))
# Returning plaintext to called function
return plaintext
# Main Function
def main(plaintext, im1, im1Secr1):
# Receiving Plaintext from User
# plaintext = input("Enter plaintext: ")
print("Plaintext: "+plaintext+"\n")
plaintext = bytes(plaintext, "utf-8")
# Compressing plaintext before Double Encryption
# plaintext = lzma.compress(plaintext)
# Encrypting the plaintext using Double Encryption
ciphertext = encrypt(plaintext)
# Hiding the Double Encrypted ciphertext in a cover image
hide(ciphertext, im1, im1Secr1)
# Calling reveal() to reveal the hidden ciphertext in the coverImageSecret.png
revealed_ciphertext = reveal(im1Secr1)
# Decrypting the obtained ciphertext from the steganographic image
decrypted_plaintext = decrypt(revealed_ciphertext)
# print('\n\Compressed Output :')
# print(decrypted_plaintext)
# Decompressing the obtained plaintext after Decryption
# decrypted_plaintext = lzma.decompress(decrypted_plaintext)
decrypted_plaintext = decrypted_plaintext.decode("utf-8")
# Printing Plaintext after Double Decryption
print('\n\nFinal Output :')
print(decrypted_plaintext)
# Calling the main function
im1 = "images/tulips.png"
im1Secr1 = "images/tulipsSecret1.png"
im1Secr2 = "images/tulipsSecret2.png"
im1Secr3 = "images/tulipsSecret3.png"
im1Secr4 = "images/tulipsSecret4.png"
im1Secr5 = "images/tulipsSecret5.png"
# strin = "LztxSwF)KCatW@KD]rR;!Hh4CA.=BE9PTk+MU;54?8_GR)+i:3-F{uT8t*FYh#j%$_4R{j{({ht=yWKGkBH##_@&@wR}&cA]]H9?"
strin = "mgjXLQhX3OQRiEafrjTiR6pfgkjutgC1VDZhbri5iV0cuXExI58Nx5HCzeHbZm3NevEPWUqFxanKXlMNjrgOB8LXI8RFaAk2OTKOnkmr14Ds1Xv48MwJ7tcutPdLEKrOd5RTAzEOmGHem7ubxS3NvrjtsOIRSjA4Osef7bsIqNIvQ0YijUX9wO64E4AnAnIzpiITRFa0vyBBYb4JekJIXHUCdLLJyjuO6P0FS0t3dkEl2QJC5Ek6I01vDCIX5FaN7eApGSTc0dIW8g5p34kRJo5GlaXxeVdOQFghxWJQsxq0ckjG2eAlHjpCPoly82I2JqywKfg7XQmfGGEI8QP5e3FUZMv7rtyJmW9vVfYRVX8lQsArd8ASsmNV62nL9vWDWJUi8a9VhZHUucMmoD2u6DeiT3s3YAQPc7BV6vRfnAQ1knot50L3D41AgItO9ckCEnr8PHNNHdKFPQ25GKec8RLEWA3ArgUxfsOHQF7GK9cAq2NlY6tE38bu5JhDBquxHxlUaWld3fFhl83dNli6n3ETyD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tLr88l3NKyTIIIkmuf5GP30ri3OvBPfTkoOtXQdDtlkZ9HQQwiLNuDJ3VeumoRSbvuH8LXUY7ECqGGMqJtrIvFxg6DTXLlTghLldFoWdKBciipTvENtVNMHPRPJL577hoD2vyhwV6xZxjg8cZpq0Q5evDjTIcQ0gJcoFWAmcPG4CarTPau09fUm8nSPYPneJv99C7dlk77IDNjh1AKgd8u2jZmuBNYy3OFfQ055nVZB4rW9R7lxvMimyIIrzWdH57ag3XduBkZF3dZrE29sZ8V2MqCGjvdGIMCUCRjwizKMr4i8NS93z947vORL1iJinEu5kapGNKlewM4uXkkimFcZRAs0vnGOZ0ktmPhClwNSI1dO0vdxxHJZh9yp1PABJ36ToqobJ8lGCwgF5OF4O5NDyuWLxg7wVS3Xxabh6zjf2hHlyBXpnBV07a3vqnW10RfvjommSSnst55Zg7QswBEzuYx49Xe3hJc5sKn6Tf4opE7pCpR3sUt98dcE26MR3W9Xfuttlzb9hoU8fHSWtCKmeDms3Du46gdKyrmn7U0lt7ikJ6e0CsF444X5DGSXazpwwWWNI0ID0EKfkUDEwNdCDMWHnyAcqxKxUqSQyawKWoOUeE1FF3Ru0uoAKNBssVZxZ8abbaZHWR6iDn1msIPnJstlp89ykLveNi64nmxgBYy47Y8JP6Gddit5W9S4AnXyKayWRoSIbTwzzBhxnoePE38z7bHYCUZk4H"
img = Image.open(im1)
width = img.width
height = img.height
# display width and height
print("pixels * 3: ", width * height * 3)
print("length", len(strin.encode('utf-8')) * 8)
# main("M5Csn",im1,im1Secr1)
# main("10TkfR2iWg",im1,im1Secr2)
# main("bvrod1ElJRD8T6H",im1,im1Secr3)
# main("MiMvlXX4vMD9WfssukC2",im1,im1Secr4)
main(strin, im1, im1Secr1)