Fix documentation of AES padding #41

Open
opened 2025-04-21 14:48:05 -04:00 by idk · 7 comments
Owner

Opened 8 years ago

Last modified 2 years ago

#833assigneddefect

Fix documentation of AES padding

Reported by:zzzOwned by:slumlord
Priority:
minor
Milestone:

Component:
www/i2p
Version:

Keywords:
docs, easy
Cc:

Parent Tickets:

Sensitive:
no

Description

We don't really use PKCS.

Ref:

​http://www.i2p2.i2p/how_cryptography

​http://zzz.i2p/topics/1318

Subtickets

Opened [8 years ago](/timeline?from=2013-01-04T23%3A13%3A56Z&precision=second "See timeline at Jan 4, 2013 11:13:56 PM") Last modified [2 years ago](/timeline?from=2019-01-10T14%3A01%3A45Z&precision=second "See timeline at Jan 10, 2019 2:01:45 PM") ## [\#833](/ticket/833)[assigned](/query?status=assigned)[defect](/query?status=!closed&type=defect) # Fix documentation of AES padding Reported by:[zzz](/query?status=!closed&reporter=zzz)Owned by:[slumlord](/query?status=!closed&owner=slumlord) Priority: [minor](/query?status=!closed&priority=minor) Milestone: Component: [www/i2p](/query?status=!closed&component=www%2Fi2p) Version: Keywords: [docs](/query?status=!closed&keywords=~docs), [easy](/query?status=!closed&keywords=~easy) Cc: Parent Tickets: Sensitive: [no](/query?status=!closed&sensitive=0) ### Description We don't really use PKCS. Ref: [​http://www.i2p2.i2p/how\_cryptography](http://www.i2p2.i2p/how_cryptography) [​http://zzz.i2p/topics/1318](http://zzz.i2p/topics/1318) ### Subtickets
idk added this to the undecided milestone 2025-04-21 14:48:05 -04:00
idk added the
#833
i2p
www
labels 2025-04-21 14:48:05 -04:00
Author
Owner

comment:7 Changed 2 years ago by zzz

I think the ticket came about because somebody complained to me that we don't do PKCS padding. But I think that one of the PKCS flavors is just adding random stuff at the end. If that's the case, we do it. Maybe that's what PKCS #5 1.5 means. That's jrandom text in there. So the mission is to research PKCS padding, figure out if we do it, and if the text in our specs is correct or not, if not, fix it.

[comment:7](https://trac.i2p2.de/\#comment:7) Changed [2 years ago](https://trac.i2p2.de//timeline?from=2019-01-10T14%3A01%3A45Z&precision=second "See timeline at Jan 10, 2019 2:01:45 PM") by zzz I think the ticket came about because somebody complained to me that we don't do PKCS padding. But I think that one of the PKCS flavors is just adding random stuff at the end. If that's the case, we do it. Maybe that's what PKCS [#5](https://trac.i2p2.de//ticket/5 "#5: defect: Typographical error (closed: fixed)") 1.5 means. That's jrandom text in there. So the mission is to research PKCS padding, figure out if we do it, and if the text in our specs is correct or not, if not, fix it.
Author
Owner

comment:6 Changed 3 years ago by slumlord

What should that be changed to? Should I remove the (PKCS#5 1.5, section 8.1 (for block type 02)) portion?

[comment:6](https://trac.i2p2.de/\#comment:6) Changed [3 years ago](https://trac.i2p2.de//timeline?from=2018-06-20T10%3A59%3A56Z&precision=second "See timeline at Jun 20, 2018 10:59:56 AM") by slumlord What should that be changed to? Should I remove the `(PKCS#5 1.5, section 8.1 (for block type 02))` portion?
Author
Owner

comment:5 Changed 3 years ago by zzz

Owner:
set to _slumlord_Status:open →
assigned

[comment:5](https://trac.i2p2.de/\#comment:5) Changed [3 years ago](https://trac.i2p2.de//timeline?from=2018-06-19T16%3A01%3A41Z&precision=second "See timeline at Jun 19, 2018 4:01:41 PM") by zzz Owner: set to _slumlord_Status:open → assigned
Author
Owner

comment:4 Changed 3 years ago by slumlord

Link is now ​http://i2p-projekt.i2p/spec/cryptography

PKCS is mentioned in reference to AES here:

...
We use AES with 256 bit keys and 128 bit blocks in CBC mode.
The padding used is specified in IETF [RFC-2313] (PKCS#5 1.5, section 8.1 (for block type 02)).
In this case, padding exists of pseudorandomly generated octets to match 16 byte blocks.
Specifically, see the CBC code [CryptixAESEngine] and the Cryptix AES implementation
[CryptixRijndael_Algorithm], as well as the padding, found in the
ElGamalAESEngine.getPadding function [ElGamalAESEngine].
...

[comment:4](https://trac.i2p2.de/\#comment:4) Changed [3 years ago](https://trac.i2p2.de//timeline?from=2018-04-03T15%3A01%3A37Z&precision=second "See timeline at Apr 3, 2018 3:01:37 PM") by slumlord Link is now [​http://i2p-projekt.i2p/spec/cryptography](https://trac.i2p2.de/http://i2p-projekt.i2p/spec/cryptography) PKCS is mentioned in reference to AES here: ``` ... We use AES with 256 bit keys and 128 bit blocks in CBC mode. The padding used is specified in IETF [RFC-2313] (PKCS#5 1.5, section 8.1 (for block type 02)). In this case, padding exists of pseudorandomly generated octets to match 16 byte blocks. Specifically, see the CBC code [CryptixAESEngine] and the Cryptix AES implementation [CryptixRijndael_Algorithm], as well as the padding, found in the ElGamalAESEngine.getPadding function [ElGamalAESEngine]. ... ```
Author
Owner

comment:3 Changed 4 years ago by slumlord

This ticket's quite old, I just wanted to add the following comment:

The link referred to earlier ​http://www.i2p2.i2p/how_cryptography seems to be outdated, ​http://i2p-projekt.i2p/en/how_cryptography has a newer version.

[comment:3](https://trac.i2p2.de/\#comment:3) Changed [4 years ago](https://trac.i2p2.de//timeline?from=2017-04-25T23%3A43%3A46Z&precision=second "See timeline at Apr 25, 2017 11:43:46 PM") by slumlord This ticket's quite old, I just wanted to add the following comment: The link referred to earlier [​http://www.i2p2.i2p/how\_cryptography](https://trac.i2p2.de/http://www.i2p2.i2p/how_cryptography) seems to be outdated, [​http://i2p-projekt.i2p/en/how\_cryptography](https://trac.i2p2.de/http://i2p-projekt.i2p/en/how_cryptography) has a newer version.
Author
Owner

comment:2 Changed 5 years ago by str4d

Keywords:easy added
Status:new →
open

[comment:2](https://trac.i2p2.de/\#comment:2) Changed [5 years ago](https://trac.i2p2.de//timeline?from=2016-02-17T23%3A09%3A09Z&precision=second "See timeline at Feb 17, 2016 11:09:09 PM") by str4d Keywords:_easy_ added Status:new → open
Author
Owner

comment:1 Changed 8 years ago by str4d

Keywords:docs added

[comment:1](https://trac.i2p2.de/\#comment:1) Changed [8 years ago](https://trac.i2p2.de//timeline?from=2013-10-25T12%3A42%3A53Z&precision=second "See timeline at Oct 25, 2013 12:42:53 PM") by str4d Keywords:_docs_ added
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: I2P_Developers/i2p.www#41
No description provided.