m8 (saifar)

guudha lipi saastramlo, m8 anedi hitachi marchi roopondinchina block saanketikalipi. idhi hitachi yokka munupati m6 algorithm yokka savarana, idhi hardware mariyu 32-bitt software amalu rendintiloonuu ekkuva bhadrata mariyu adhika paniteeru kosam roopondinchabadindi. roopondinchabadindi marchi marchi hitachi dwara iso/iec 9979-0020 gaa namodu cheyabadindi.
m6 maadirigaane, m8 anedi 64 bitla block parimaanamtho kuudina fistel saanketikalipi. round functionlo 32-bitt bhramanaalu, xors mariyu modular adanamgaa undavacchu, idhi arcs saanketikalipiki prarambha udaaharanagaa maarutundi.
saanketikalipi chara sankhya roundlanu kaligi untundi (edainaa saanukuula puurnaamkam n), veetilo prati okkati round-nirdishta "algorithm nirnayam kii" dwara nirnayinchabade nirmaanaanni kaligi untundi. roundlanu kii-aadhaaritamgaa cheyadam anedi guudha lipi vislaeshanhanu marinta kashtataram cheyadaaniki uddesinchabadindi (idhe vidhamaina roopakalpana tatvasaastram kosam kappa chudandi).
saanketikalipi vivarana.
round kountnu edainaa saanukuula puurnaamkam puurnaamkam sett cheyavachu, conny kaneesam 10 round count sifaarsu cheyabadindi. keelo naalugu bhagalu untayih 64-bitt dayta kii, 256-bitt kii vistarana kii, n 24-bitt algorithm nirnayam keela samiti mariyu n 96-bitt algorithm vistarana keela samiti.
round function kii vistarana mariyu encryption/decryption rendintikee upayoginchabadutundi. kii vistarana prakriya 64-bitt dayta kii mariyu 256-bitt kii vistarana keeni 256-bitt execution keega maarustundi, indulo 4 jatala 32-bitt sankhyala formula _ 1 untundi.
saanketikalipi oka vilakshanhamaina fistel saanketikalipi roopakalpananu kaligi untundi. modata, 64-bitt input block rendu 32-bitt bhagaluga vibhajinchabadindi. prati roundloo, edama sagam keelaka-aadhaarita parivartanaku lonavutundi, aapai kudi sagamtho kalapabadutundi. chivaraku, sagam marpidi cheyabadutundi. mottamgaa, round functionlo tommidi anukuuleekarinchadagina karyakalapalu mariyu moodu bitwise bhramanaala kramam untundih
suutram _ 2
suutram _ 3 anedi round sankhyanu suuchistumdi, idhi inputlanu suutram _ 4 mariyu suutram _ 5 nuu teesukuntundi. suutram _ 6 anedi round yokka algorithm vistarana kii yokka moodu 32-bitt padaalu. suutram _ 7 anedi amalu kii nundi vacchina padaalu. suutram _ 8 anedi edama vaipuna bitt vais rotationnu suuchistumdi. formula _ 9 mariyu formula _ 10 24-bitt algorithm desition kii dwara eee krindi vidhamgaa nirvachinchabaddayih
ikkada ikkada nundi nundi varaku prati bitt (0 = addition mode 232,1 = xor) mariyu mariyu nundi nundi varaku aidu bits untaayi.
kii vistaranalo enimidi saifar roundlu untaayi, modati enimidi algorithm nirnayam mariyu vistarana keelu, kii vistarana keeni amalu keega mariyu dayta keeni input blackga upayogistundi. enimidi madhyantara avutputlu, formula _ 11 nuu execution kii formula _ 1 yokka enimidi bhagaluga upayogistaaru.
saifar amalu.
pythonlo saifar amalu krinda ivvabadindi.
m = 0xffffffff
def jodinchandi (x, y):
 tirigi (x + y) & m
def xor (x, y):
 x ^ y tirigi ivvandi
def roll (x, s):
 tirigi (x "s) | (x "(32-s)) & m
def m8 _ round (l, r, ri, k, adk, aek):
 algorithm yokka oka round.
 l, r: input
 rih round index
 k: 256-bitt amalu kii
 ADK: 24-bitt algorithm nirnayam kii
 aek: 96-bitt algorithm vistarana kii
 i kosam opp = [[jodinchandi, xor] [(adk "(23-i)) & 1] paridhiloo (9)]
 s1 = (adk "10) & 0x1f
 s2 = (adk "5) & 0x1f
 s3 = (adk "0) & 0x1f
 a = (aek "64) & m
 b = (aek "32) & m
 c = (aek "0) & m
 kr = (k "(32 + 64 * (3-ri% 4))) & m
 kl = (k "(0 + 64 * (3-ri% 4))) & m
 x = opp [0] (l, kl)
 y = opp [2] (opp [1] (roll (x, s1), x), a)
 z = opp [5] (opp [4] (opp [3] (roll (y, s2), y), b), kr)
 tirigi opt [8] (opt [7] (opt [6] (roll (z, s3), z), c), r), l
def m8 _ kxpand (dk, kek, adks, aeks):
 keelaka vistarana.
 dk: 64-bitt dayta kii
 keck 256-bitt kii vistarana kii
 ADKS: algorithm nirnayam keelu
 aex algorithm vistarana keelu
 l = (dk "32) & m
 r = (dk "0) & m
 k = 0
 I shrenilo (8):
 l, r = m8 _ round (l, r, i, kek, adks [i], aeks [i])
 keey. |= (l "(32 * (7-i)))
 k nii tirigi ivvandi
def m8 _ encrypt (dayta, n, dk, kek, adks, aeks):
 oka blacknu m8 thoo encrypt cheyandi.
 daytah 64-bitt input block
 n: roundla sankhya (> = 8 ayi undaali)
 dk: 64-bitt dayta kii
 keck 256-bitt kii vistarana kii
 eah. dii. keey. ess enn 24-bitt algorithm nirnayam keela jabita
 aex enn 96-bitt algorithm vistarana keela jabita
 ek = m8 _ kxpand (dk, kek, adks, aeks)
 l = (dayta "32) & m
 r = (dayta "0) & m
 I kosam paridhi (n):
 l, r = m8 _ round (l, r, i, ek, adks [i], aeks [i])
 tirigi (ell "32) | aarr
phalitam = m8 _ encrypt (
 0x0000 _ 0000 _ 0000 _ 0001,
 126,
 0x0123 _ 4567 _ 89ab _ cdef,
 0,
 [0x848b6d, 0x8489bb, 0x84b762,0x84eda2] * 32,
 [0x0000 _ 0001 _ 0000 _ 0000 _ 0000] * 126,
spashtamaina phalitam = = 0xfe4b _ 1622 _ e446 _ 36c0
pareeksha vahakalu.
iso/iec 9979-0020 yokka prachurita samskaranalo eee krindi pareeksha dayta untundih
guudha lipi vislaeshanha.
saanketikalipi yokka kii-aadhaarita pravartana phalitamgaa [[balaheenamaina kii] la yokka pedda taragati [[differential cryptanolysis]], [[leanier cryptanolysis]] mariyu [[mode enn cryptanolysis]] thoo sahaa aneka rakaala daadulaku saanketikalipi bahirgatam chestundi. 
suuchanalu.
[[worghamfistell siphers]]

