Re: Multi-block poly1303 code (was: Re: Fwd: [Arm64, PowerPC64, S390x] Optimize Poly1305)

2022-10-25 Thread Maamoun TK
On Tue, Oct 25, 2022 at 7:04 PM Maamoun TK wrote: > On Mon, Oct 24, 2022 at 9:44 PM Niels Möller wrote: > >> Maamoun TK writes: >> >> > I think the design could be as simple as always padding each block with >> > 0x01 in _nettle_poly1305_update while keeping _nettle_poly1305_block >> that >> >

Re: Multi-block poly1303 code (was: Re: Fwd: [Arm64, PowerPC64, S390x] Optimize Poly1305)

2022-10-25 Thread Maamoun TK
On Mon, Oct 24, 2022 at 9:44 PM Niels Möller wrote: > Maamoun TK writes: > > > I think the design could be as simple as always padding each block with > > 0x01 in _nettle_poly1305_update while keeping _nettle_poly1305_block that > > is responsible for processing last block takes variable

Multi-block poly1303 code (was: Re: Fwd: [Arm64, PowerPC64, S390x] Optimize Poly1305)

2022-10-24 Thread Niels Möller
Maamoun TK writes: > I think the design could be as simple as always padding each block with > 0x01 in _nettle_poly1305_update while keeping _nettle_poly1305_block that > is responsible for processing last block takes variable padding values (0 > or 1). I committed an update in >

Re: Fwd: [Arm64, PowerPC64, S390x] Optimize Poly1305

2022-10-19 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > Ideally, I'd like to have something like the below: > > uint64_t l0, l1, l2, h0, h1, h1; > > l0 = p0 & 0xfff; h0 = p0 >> 44; > l1 = p1 & 0xfff; h1 = p1 >> 44; > l2 = p2 & 0x3ff; h2 = p2 >> 42; > > ctx->hh0 = l0 +

Re: Fwd: [Arm64, PowerPC64, S390x] Optimize Poly1305

2022-10-19 Thread Niels Möller
Maamoun TK writes: > I think the design could be as simple as always padding each block with > 0x01 in _nettle_poly1305_update while keeping _nettle_poly1305_block that > is responsible for processing last block takes variable padding values (0 > or 1). I agree that should work. In some sense

Re: Fwd: [Arm64, PowerPC64, S390x] Optimize Poly1305

2022-10-18 Thread Maamoun TK
On Sat, Oct 15, 2022 at 9:37 AM Niels Möller wrote: > Maamoun TK writes: > > > I updated https://git.lysator.liu.se/nettle/nettle/-/merge_requests/48 > to > > have the logic of processing partial blocks in C files. > > I was thinking of something like > > const uint8_t * >

Re: Fwd: [Arm64, PowerPC64, S390x] Optimize Poly1305

2022-10-15 Thread Niels Möller
Maamoun TK writes: > I updated https://git.lysator.liu.se/nettle/nettle/-/merge_requests/48 to > have the logic of processing partial blocks in C files. I was thinking of something like const uint8_t * _nettle_poly1305_update(struct poly1305_ctx*, size_t blocks, const

Fwd: [Arm64, PowerPC64, S390x] Optimize Poly1305

2022-10-15 Thread Maamoun TK
On Thu, Oct 13, 2022 at 10:19 PM Niels Möller wrote: > Maamoun TK writes: > > > It seems Debian release cycle takes ~2 year for every new version > recently > > https://wiki.debian.org/DebianReleases so I pushed a MR that enables > > testing power9-specific code > >