Authenticated tag is wrong on streams
@MHumm đang làm issue này rồi.
Từ ngày 22/4/2025.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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
- Ngôn ngữ chính
- HTML
- Star
- 286
- Fork
- 78
- Merge trung bình
- 1 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của MHumm/DelphiEncryptionCompendium
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
CRC64 - PKI AdditionCó thể làm lại được @MHumm đã nhận 149 ngày trước và không có pull request nào đang mở. Đang mởenhancement help wanted
MHumm/DelphiEncryptionCompendium#93 · 1 bình luận · 1 người được giao ·
-
Missing PUInt8Array type in the GetIt version.Có thể làm lại được @MHumm đã nhận 161 ngày trước và không có pull request nào đang mở. Đang mởbug delphi
MHumm/DelphiEncryptionCompendium#92 · 2 bình luận · 1 người được giao ·
-
Help with demoĐang mởquestion
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 25/100
MHumm/DelphiEncryptionCompendium#91 · 6 bình luận ·
-
Chacha20 Poly1305Có thể làm lại được @MHumm đã nhận 459 ngày trước và không có pull request nào đang mở. Đang mởenhancement
MHumm/DelphiEncryptionCompendium#89 · 1 bình luận · 1 người được giao ·