Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Authenticated tag is wrong on streams

Aperta
#87 20 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@MHumm ci sta già lavorando.

Dal 22/4/2025.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

bug

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...)

FailStreamEncrypt.txt

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

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di MHumm/DelphiEncryptionCompendium

Tutte le issue di MHumm/DelphiEncryptionCompendium

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.