zuse: propagates fix to aes-128-siv and aes-192-siv as well
:: :: ++s2va:aes:crypto
++ s2va :: AES-128 S2V
~/ %s2va
- |= {key/@H ads/(list @)}
- =+ res=(maca key `16 0x0)
- %^ maca key ~
- |- ^- @uxH
+ |= [key=@H ads=(list @)]
?~ ads (maca key `16 0x1)
+ =/ res (maca key `16 0x0)
+ %+ maca key
+ |- ^- [[~ @ud] @uxH]
?~ t.ads
- ?: (gte (xeb i.ads) 128)
- (mix i.ads res)
- %+ mix
- (doub res)
- (mpad (met 3 i.ads) i.ads)
+ =/ wyt (met 3 i.ads)
+ ?: (gte wyt 16)
+ [`wyt (mix i.ads res)]
+ [`16 (mix (doub res) (mpad wyt i.ads))]
%= $
- res %+ mix
- (doub res)
- (maca key ~ i.ads)
ads t.ads
+ res (mix (doub res) (maca key ~ i.ads))
==
:: :: ++s2vb:aes:crypto
++ s2vb :: AES-192 S2V
~/ %s2vb
- |= {key/@I ads/(list @)}
- =+ res=(macb key `16 0x0)
- %^ macb key ~
- |- ^- @uxH
+ |= [key=@I ads=(list @)]
?~ ads (macb key `16 0x1)
+ =/ res (macb key `16 0x0)
+ %+ macb key
+ |- ^- [[~ @ud] @uxH]
?~ t.ads
- ?: (gte (xeb i.ads) 128)
- (mix i.ads res)
- %+ mix
- (doub res)
- (mpad (met 3 i.ads) i.ads)
+ =/ wyt (met 3 i.ads)
+ ?: (gte wyt 16)
+ [`wyt (mix i.ads res)]
+ [`16 (mix (doub res) (mpad wyt i.ads))]
%= $
- res %+ mix
- (doub res)
- (macb key ~ i.ads)
ads t.ads
+ res (mix (doub res) (macb key ~ i.ads))
==
:: :: ++s2vc:aes:crypto
++ s2vc :: AES-256 S2V
