diff --git a/bin/solid.pill b/bin/solid.pill index 2851e6e178..7b03a7198c 100644 --- a/bin/solid.pill +++ b/bin/solid.pill @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:46d79f0b3dc1c4ff5f7ca56f1601a26a0fbc67540ab0ebcc672dc282fe8bbe74 -size 13825786 +oid sha256:aacd15519a11badc17cbb3de42500a4673c0189d1cee11d759b6472629a88722 +size 13817804 diff --git a/pkg/arvo/sys/zuse.hoon b/pkg/arvo/sys/zuse.hoon index d84a5f8fc4..af0513d5de 100644 --- a/pkg/arvo/sys/zuse.hoon +++ b/pkg/arvo/sys/zuse.hoon @@ -3642,62 +3642,53 @@ :: :: ++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 ~/ %s2vc - |= {key/@I ads/(list @)} - =+ res=(macc key `16 0x0) - %^ macc key ~ - |- ^- @uxH + |= [key=@I ads=(list @)] ?~ ads (macc key `16 0x1) + =/ res (macc key `16 0x0) + %+ macc 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) - (macc key ~ i.ads) ads t.ads + res (mix (doub res) (macc key ~ i.ads)) == :: :: ++siva:aes:crypto ++ siva :: AES-128 SIV diff --git a/pkg/arvo/tests/sys/zuse/crypto/aes.hoon b/pkg/arvo/tests/sys/zuse/crypto/aes.hoon index e3b8126a33..840e7de214 100644 --- a/pkg/arvo/tests/sys/zuse/crypto/aes.hoon +++ b/pkg/arvo/tests/sys/zuse/crypto/aes.hoon @@ -567,6 +567,18 @@ ^- (list vector-siv) :~ :: + :: failed in the wild, see https://github.com/urbit/urbit/pull/3013 + :: + :^ 0xfdef.6253.d284.a940.1b5d.d1b7.fbcd.4489. + 3071.bf93.ace9.37da.7c5d.77d2.1f3e.cda4. + 83be.1c51.a88b.c9ba.8741.e1ee.935b.c0ef. + 888a.feff.0249.bdb6.1344.0ff9.4e1b.fca5 + ad=~ + inp=0x97.0341.38e3.960e.87e1 + :+ iv=0x249f.85e3.c9a8.29b6.3122.ec22.cde6.76df + len=9 + cph=0xdc.bdcd.e4f1.4fd4.2d8d + :: :: from RFC 5297, with extended key :: :^ 0xfffe.fdfc.fbfa.f9f8.f7f6.f5f4.f3f2.f1f0.