Authenticated tag is wrong on streams
@MHumm ci sta già lavorando.
Dal 22/4/2025.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
The routine EncodeStream creates a different authentication tag as the EncodeBytes if the field
DatatToAuthenticate is used.
The problems seems to be that EncodeStream splits the buffer in 8kB blocks and calls EncodeGCM multiple
times. Here the DataToAuthenticate field is used on every call which means that it is mengled into the
tag calculatation on each iteration.
EncodeBytes calls the EncodeGCM routine only once on the whole buffer. Check out the attached project (unfortunately I could not upload a dpr file only a txt file...)
On a different matter... would it be possible to add an additional parameter to the EncodeStream function that allows
to change the endianess of the stream? There are built in classes that allow to operate on TBytes but not on streams.
(Or... did I miss something?)
My background here is to create an encrypted firmeware file for a microcontroller which uses an ARM CPU
- Lingua principale
- HTML
- Stelle
- 286
- Fork
- 78
- Merge medio
- 1g 4h
- PR unite (30g)
- 4
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di MHumm/DelphiEncryptionCompendium
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
CRC64 - PKI AdditionForse di nuovo libera @MHumm l’ha presa 149 giorni fa e non c’è nessuna pull request aperta. Apertaenhancement help wanted
MHumm/DelphiEncryptionCompendium#93 · 1 commento · 1 assegnatario ·
-
Missing PUInt8Array type in the GetIt version.Forse di nuovo libera @MHumm l’ha presa 160 giorni fa e non c’è nessuna pull request aperta. Apertabug delphi
MHumm/DelphiEncryptionCompendium#92 · 2 commenti · 1 assegnatario ·
-
Help with demoApertaquestion
Difficoltà 4/5 1-2 giorni Idoneità per principianti 25/100
MHumm/DelphiEncryptionCompendium#91 · 6 commenti ·
-
Chacha20 Poly1305Forse di nuovo libera @MHumm l’ha presa 459 giorni fa e non c’è nessuna pull request aperta. Apertaenhancement
MHumm/DelphiEncryptionCompendium#89 · 1 commento · 1 assegnatario ·