Authenticated tag is wrong on streams
@MHumm ya está trabajando en esto.
Desde el 22/4/2025.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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
- Lenguaje dominante
- HTML
- Estrellas
- 286
- Forks
- 78
- Merge medio
- 1 d 23 min
- PR fusionados (30 d)
- 5
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de MHumm/DelphiEncryptionCompendium
-
CRC64 - PKI AdditionQuizá libre de nuevo @MHumm la tomó hace 151 días y no hay ningún pull request abierto. Abiertoenhancement help wanted
MHumm/DelphiEncryptionCompendium#93 · 1 comentario · 1 asignado ·
-
Missing PUInt8Array type in the GetIt version.Quizá libre de nuevo @MHumm la tomó hace 162 días y no hay ningún pull request abierto. Abiertobug delphi
MHumm/DelphiEncryptionCompendium#92 · 2 comentarios · 1 asignado ·
-
Confused by NEXTGEN directiveQuizá libre de nuevo @MHumm la tomó hace 533 días y no hay ningún pull request abierto. Abiertobug
MHumm/DelphiEncryptionCompendium#88 · 8 comentarios · 1 asignado ·
-
Support for AEGIS 256Quizá libre de nuevo @MHumm la tomó hace 854 días y no hay ningún pull request abierto. Abiertoenhancement help wanted
MHumm/DelphiEncryptionCompendium#77 · 3 comentarios · 1 reacción · 1 asignado ·
-
Range Check Exception when using KDF with empty passwordQuizá libre de nuevo @MHumm la tomó hace 889 días y no hay ningún pull request abierto. Abiertobug help wanted
MHumm/DelphiEncryptionCompendium#76 · 4 comentarios · 1 asignado ·