Advance Encryption Standard - AES
नोट :- अगर आप बहुत ज्यादा secure and encrypted data चाहते हो तो आप Round बढ़ा सकते हो और हर Round के साथ cipher key का size भी बढ़ जायेगा जैसे - 10 Round = use 128 bits cipher key, 12 Round = use 192 bits cipher key and 14 Round = use 256 bits cipher key.
दोस्तो आज के इस ब्लाग में हम बात करने वाले हैं Advance Encryption standard क्या होता है, AES की working क्या है और कैसे इस algorithm से किसी Plain text को Cipher text में convert किया जाता है।
Advance Encryption Standard (AES) - AES एक symmetric key algorithm हैं जिसकी मदद से हम किसी text को Encrypt and decrypt करते हैं। AES किसी भी text को 10 Round में Encrypt करता हैं और हर Round के साथ 4 subkeys use की जाती हैं मतलब आपका जो Plain text हैं 10 बार encrypt होगा, उसके बाद final cipher text आयेगा। कुछ questions जो Interview में पूछे जाते हैं, उनके बारे में जानते हैं।
1. AES Algorithm में Plain text का size 128 bits होता है।
2. AES Algorithm में Master key का Size 128 bits का होता हैं जिससे subkey generate की जाती हैं।
2. AES Algorithm में 10 Round होते हैं जिसमें 128 bits cipher key का use होता है और हर round के साथ 4 Subkey use की जाती हैं और start में Preround calculation के लिये 4 subkeys use की जाती हैं। (means 10 Rounds and 44 Subkeys)
3. AES Algorithm में subkey का size 32 bits होता है।
4. AES Algorithm में भी जितना आपके plain text का size होगा उतना ही cipher text का size होगा means 128bits.
5. AES Algorithm में key को word से भी प्रदर्शित कर सकते हैं जहा 1 word = 32 bits = 1 subkey.
Encryption steps in AES - Round 1
Sub Bytes - सबसे पहले आपके 128 bits (16 Bytes) data को एक fixed box जिसे हम S-box कहते हैं उसमे substitute किया जाता है और Result में हमे 4x4 की matrix मिलती हैं जिसमे 4 Row और 4 column होते हैं।
Shift Rows - इस shifting operation में matrix की हर Row left में shift होती हैं -
matrix की First Row shift नही होती हैं
matrix की Second Row one position (1 Byte) left shift होती हैं
matrix की Third Row two position (2 Byte) left shift होती हैं
matrix की Fourth Row three position (3 Byte) left shift होती हैं
Result में हमे जो New matrix मिलती है वो भी 128 bits (16 Bytes) की ही होती है।
Mix Column - इस operation में एक special mathematics function का use करके प्रत्येक column की four bytes को transformed किया जाता है। इस function हर column की four bytes को input लिया जाता है और output में हमे हर Column के लिये new four bytes मिलती हैं। ये new four bytes Column की पुरानी four bytes को replace करती हैं। (Note - ये operation last round में perform नही किया जाता है)
Add Round Key - इस operation में 16 bytes की matrix को 128 bits में consider किया जाता हैं और इसका 128 bits की Round key के साथ XORed होता हैं और result में हमे 128 bits का data मिलता है। अगर ये last round है तो यही आपका cipher text हैं और last round नही हैं तो ये data similiarily next Round में process हो जाता है।
ये Relation होता हैं key & Round में।
Thanks Have a gud time...
Follow for more update...
More Related Article -
0 Comments