From 11414495cd03cc9eeff9115e0693194cf3303f5a Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Tue, 25 Jul 2023 18:44:39 +0200 Subject: [PATCH 1/7] aesfix initial load --- .gitignore | 2 + aesfix-10_add-GCC-hardening.patch | 20 ++++ aesfix.1 | 38 ++++++++ aesfix.spec | 87 ++++++++++++++++++ ...E404FFD3C931F934052D06B8841A919D0FACE4.gpg | Bin 0 -> 564 bytes sources | 2 + 6 files changed, 149 insertions(+) create mode 100644 .gitignore create mode 100644 aesfix-10_add-GCC-hardening.patch create mode 100644 aesfix.1 create mode 100644 aesfix.spec create mode 100644 gpgkey-12E404FFD3C931F934052D06B8841A919D0FACE4.gpg create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..255ccc9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/aesfix-*.tar.gz +/aesfix-*.tar.gz.asc diff --git a/aesfix-10_add-GCC-hardening.patch b/aesfix-10_add-GCC-hardening.patch new file mode 100644 index 0000000..56ee40a --- /dev/null +++ b/aesfix-10_add-GCC-hardening.patch @@ -0,0 +1,20 @@ +Description: add GCC hardening. +Author: Joao Eriberto Mota Filho +Last-Update: 2015-02-23 +Index: aesfix-1.0.1/Makefile +=================================================================== +--- aesfix-1.0.1.orig/Makefile ++++ aesfix-1.0.1/Makefile +@@ -1,10 +1,10 @@ +-CXXFLAGS= -Wall -O4 -funroll-loops ++CXXFLAGS += -Wall -O4 -funroll-loops + OBJS= aesfix.o errvect.o + + all: aesfix + + aesfix: $(OBJS) +- $(CXX) -o aesfix $(OBJS) ++ $(CXX) $(LDFLAGS) -o aesfix $(OBJS) + + clean: + @rm -f aesfix *~ \#* $(OBJS) diff --git a/aesfix.1 b/aesfix.1 new file mode 100644 index 0000000..2357f79 --- /dev/null +++ b/aesfix.1 @@ -0,0 +1,38 @@ +.TH "aeskeyfind" "1" "2020-02-28" "User Commands" "User Commands" +.SH "NAME" +aeskeyfind \- Locates 128-bit and 256-bit AES keys in a captured memory image. +.SH SYNOPSIS +.B aesfix +SCHEDULE-FILE +.SH DESCRIPTION +SCHEDULE-FILE +The aesfix tool corrects bit errors in an AES key schedule read from the specified hex-encoded file. +.PP +This program is limited to AES-128 key schedules, and it can only correct unidirectional 1->0 +bit errors. For the most part it has been optimized for readability +rather than performance. +.PP +The algorithm has these major steps: +.PP +1. Given a key schedule containing bit errors, divide the schedule + into four 7-bit "slices", each of which should be uniquely + determined by its first four bits. +.PP +2. For increasing number of errors w to the key (round 0) bytes: +.PP + a. List possible "decoded" values that could have suffered w + or fewer unidirectional errors to form the slice. +.PP + b. Consider all the key schedules generated by combinations of + these decodings. If one could have decayed into the key + schedule that we're trying to repair, output it and stop. +.SH AUTHOR +.TP +aesfix was written by Nadia Heninger and and J. Alex Halderman. +.SH "SEE ALSO" +\fBaeskeyfind\fR(1), +\fBbiosmemimage\fR(1), +\fBrsakeyfind\fR(1) +.PP +.UR "https://citp.princeton.edu/our-work/memory/" +.BR "https://citp.princeton.edu/our-work/memory/" diff --git a/aesfix.spec b/aesfix.spec new file mode 100644 index 0000000..1601607 --- /dev/null +++ b/aesfix.spec @@ -0,0 +1,87 @@ +Name: aesfix +Version: 1.0.1 +Release: 3%{?dist} +# 3-clause BSD license +License: BSD-3-Clause +Summary: Correct bit errors in AES-128 key schedule + +URL: https://citp.princeton.edu/our-work/memory/ +# Current code: https://citp.princeton.edu/our-work/memory/code +# Original URL: https://citp.princeton.edu/research/memory/ +# Mirror https://github.com/DonnchaC/coldboot-attacks + +# https://citpsite.s3.amazonaws.com/memory-content/src/aesfix-1.0.1.tar.gz +# Original https://citp.princeton.edu/memory-content/src/aesfix-1.0.1.tar.gz +# https://web.archive.org/web/20160501132651/https://citp.princeton.edu/memory-content/src/aesfix-1.0.1.tar.gz +# http://citpsite.s3-website-us-east-1.amazonaws.com/oldsite-htdocs/memory-content/src/%%{name}-%%{version}.tar.gz +Source0: https://citpsite.s3.amazonaws.com/memory-content/src/%{name}-%{version}.tar.gz + +# https://citpsite.s3.amazonaws.com/memory-content/src/aesfix-1.0.1.tar.gz.asc +# https://web.archive.org/web/20160501132651/https://citp.princeton.edu/memory-content/src/aesfix-1.0.1.tar.gz.asc +# http://citpsite.s3-website-us-east-1.amazonaws.com/oldsite-htdocs/memory-content/src/%%{name}-%%{version}.tar.gz.asc +Source1: https://citpsite.s3.amazonaws.com/memory-content/src/%{name}-%{version}.tar.gz.asc + +# The authenticator public key obtained from release 1.0.1 +# gpg2 -vv aeskeyfind-1.0.1.tar.gz.asc +# Signed by Jacob Appelbaum +# gpg2 --search-key B8841A919D0FACE4 +# gpg2 --search-key 12E404FFD3C931F934052D06B8841A919D0FACE4 +# gpg2 --list-public-keys 12E404FFD3C931F934052D06B8841A919D0FACE4 +# gpg2 --export --export-options export-minimal 12E404FFD3C931F934052D06B8841A919D0FACE4 > gpgkey-12E404FFD3C931F934052D06B8841A919D0FACE4.gpg +Source2: gpgkey-12E404FFD3C931F934052D06B8841A919D0FACE4.gpg + +# Manual page from Debian +Source3: aesfix.1 + +# Original Debian patch to allow build hardening by usage of CFLAGS and LDFLAGS +# Author: Joao Eriberto Mota Filho +Patch1: aesfix-10_add-GCC-hardening.patch + + +Buildrequires: gcc-c++ +Buildrequires: make +BuildRequires: gnupg2 + + +%description +The aesfix tool illustrates a technique for correcting bit errors in an +AES key schedule. This program is limited to AES-128 key schedules +and it can only correct unidirectional 1->0 bit errors. +For the most part it has been optimized for readability rather than +performance. + + +%prep +#check signature +%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' +%autosetup -n %{name} + + +%build +%set_build_flags +%make_build + + +%install +install -Dp -m755 %{name} %{buildroot}%{_bindir}/%{name} +install -d %{buildroot}%{_mandir}/man1 +install -p -m644 %{SOURCE3} %{buildroot}%{_mandir}/man1 + + +%files +%license LICENSE +%doc README samples +%{_bindir}/%{name} +%{_mandir}/man1/%{name}.1* + + +%changelog +* Tue Jul 25 2023 Michal Ambroz - 1.0.1-3 +- switch to SPDX license reference - BSD-3-Clause + +* Fri Feb 28 2020 Michal Ambroz - 1.0.1-2 +- uppercase the summary + +* Fri Feb 28 2020 Michal Ambroz - 1.0.1-1 +- package based on the aeskeyfind + diff --git a/gpgkey-12E404FFD3C931F934052D06B8841A919D0FACE4.gpg b/gpgkey-12E404FFD3C931F934052D06B8841A919D0FACE4.gpg new file mode 100644 index 0000000000000000000000000000000000000000..d161def0378102ce3744c52b44751eb31e7bb910 GIT binary patch literal 564 zcmV-40?YlG0ipy)))eRw1OT)u)~QwTw^jN0u4ZTUK~_U^Aq*HCjpB^C;(l@DJ?~y! z^$QMqY>A$GCf;MEg&BOI_vH{ayS2-wOde)>sUe9dY-x26_e#G6a(MOXc=zPfv)(r( zZdtc5QbEDg&=&Q%5%x0|#=aG{BGVG1OSj8D0lAY1^#EN?GdUV_Z3Na#`x`-&|JQ1%30s15cr()b|+2| zN^hNE;ovNTrB4Ajeat;hu2`p|*s%`*1U1{Lg-KH#U8l^uT{B^ET^+WQe2);MzZ{{{ z$#aOYo5pY!Wf1kOjc+vG*B_Ed7B7hBP5S1ZdU~Odv@{z3{QCp{eW{+5CF8z1+t`uk z5(h_!GH>c`t*9I>BS8J;by3;JM6_NRm7M#7Z!e&>*q`nuJy)eX$f?$@sAE~d0vsot zQ+fEJ$Vl#vw0o3h#aCQMJ=o;dUFGqlT77zdPm?X%HrHnYaSy4f8&b74y3d>6t8UGI zV%}yu-05<&)0i*tv?WSmV{c+0L2z(oY+_+`Z6G{qVPkJ%Kw)rjWo%+$b!{$gWpqA> zW&{%v0stlg8v_Ol2?z%R0t6KT2m=Hb0s{d89svRufCU0en5riQ2?W=0H~5V(XI zk)02$|sk C{sM>q literal 0 HcmV?d00001 diff --git a/sources b/sources new file mode 100644 index 0000000..f16f956 --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +SHA512 (aesfix-1.0.1.tar.gz) = 5a50ff0bd13ec5925547072e8a1e417cc1e17b1dd59de22cc573efad4563f44e5264e87658aec5f36e9dc179685913b96d3301111a72678df453682941d783b0 +SHA512 (aesfix-1.0.1.tar.gz.asc) = 80b57d4961855c3c5db61e58795c9c5365282332bb3fafc12da58d695bc97d1c7b834a782a74b8d6bc92ce2b5cec030945bd669a965ed5d7e024ba9e5e90ba6f From d3986f285c8d9b03bd5b3ac60c77cf6759bee8f3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jan 2024 12:21:14 +0000 Subject: [PATCH 2/7] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- aesfix.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aesfix.spec b/aesfix.spec index 1601607..cee1b29 100644 --- a/aesfix.spec +++ b/aesfix.spec @@ -1,6 +1,6 @@ Name: aesfix Version: 1.0.1 -Release: 3%{?dist} +Release: 4%{?dist} # 3-clause BSD license License: BSD-3-Clause Summary: Correct bit errors in AES-128 key schedule @@ -76,6 +76,9 @@ install -p -m644 %{SOURCE3} %{buildroot}%{_mandir}/man1 %changelog +* Fri Jan 19 2024 Fedora Release Engineering - 1.0.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Tue Jul 25 2023 Michal Ambroz - 1.0.1-3 - switch to SPDX license reference - BSD-3-Clause From 71d7e4d131a7efde882f801a44ed236ab58d0868 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 22 Jan 2024 22:44:54 +0000 Subject: [PATCH 3/7] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- aesfix.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aesfix.spec b/aesfix.spec index cee1b29..5ba5a00 100644 --- a/aesfix.spec +++ b/aesfix.spec @@ -1,6 +1,6 @@ Name: aesfix Version: 1.0.1 -Release: 4%{?dist} +Release: 5%{?dist} # 3-clause BSD license License: BSD-3-Clause Summary: Correct bit errors in AES-128 key schedule @@ -76,6 +76,9 @@ install -p -m644 %{SOURCE3} %{buildroot}%{_mandir}/man1 %changelog +* Mon Jan 22 2024 Fedora Release Engineering - 1.0.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jan 19 2024 Fedora Release Engineering - 1.0.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 1452d227bfdad3be73ad6e095fde4cef1b101a7a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 17 Jul 2024 16:41:16 +0000 Subject: [PATCH 4/7] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- aesfix.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aesfix.spec b/aesfix.spec index 5ba5a00..00341ea 100644 --- a/aesfix.spec +++ b/aesfix.spec @@ -1,6 +1,6 @@ Name: aesfix Version: 1.0.1 -Release: 5%{?dist} +Release: 6%{?dist} # 3-clause BSD license License: BSD-3-Clause Summary: Correct bit errors in AES-128 key schedule @@ -76,6 +76,9 @@ install -p -m644 %{SOURCE3} %{buildroot}%{_mandir}/man1 %changelog +* Wed Jul 17 2024 Fedora Release Engineering - 1.0.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Mon Jan 22 2024 Fedora Release Engineering - 1.0.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 3568cb2be063f4178e9fb9e9d3be995d0c8d1894 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jan 2025 10:40:46 +0000 Subject: [PATCH 5/7] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- aesfix.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aesfix.spec b/aesfix.spec index 00341ea..b584f26 100644 --- a/aesfix.spec +++ b/aesfix.spec @@ -1,6 +1,6 @@ Name: aesfix Version: 1.0.1 -Release: 6%{?dist} +Release: 7%{?dist} # 3-clause BSD license License: BSD-3-Clause Summary: Correct bit errors in AES-128 key schedule @@ -76,6 +76,9 @@ install -p -m644 %{SOURCE3} %{buildroot}%{_mandir}/man1 %changelog +* Thu Jan 16 2025 Fedora Release Engineering - 1.0.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Wed Jul 17 2024 Fedora Release Engineering - 1.0.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 42014b08859de2c953aaa0656ea194dc5d6d2119 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 23 Jul 2025 16:48:37 +0000 Subject: [PATCH 6/7] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- aesfix.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aesfix.spec b/aesfix.spec index b584f26..e2a4717 100644 --- a/aesfix.spec +++ b/aesfix.spec @@ -1,6 +1,6 @@ Name: aesfix Version: 1.0.1 -Release: 7%{?dist} +Release: 8%{?dist} # 3-clause BSD license License: BSD-3-Clause Summary: Correct bit errors in AES-128 key schedule @@ -76,6 +76,9 @@ install -p -m644 %{SOURCE3} %{buildroot}%{_mandir}/man1 %changelog +* Wed Jul 23 2025 Fedora Release Engineering - 1.0.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Thu Jan 16 2025 Fedora Release Engineering - 1.0.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 6cfa9581c7143d22e67b2f729a692109782be286 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 16 Jan 2026 03:29:53 +0000 Subject: [PATCH 7/7] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild --- aesfix.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aesfix.spec b/aesfix.spec index e2a4717..dfeff15 100644 --- a/aesfix.spec +++ b/aesfix.spec @@ -1,6 +1,6 @@ Name: aesfix Version: 1.0.1 -Release: 8%{?dist} +Release: 9%{?dist} # 3-clause BSD license License: BSD-3-Clause Summary: Correct bit errors in AES-128 key schedule @@ -76,6 +76,9 @@ install -p -m644 %{SOURCE3} %{buildroot}%{_mandir}/man1 %changelog +* Fri Jan 16 2026 Fedora Release Engineering - 1.0.1-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + * Wed Jul 23 2025 Fedora Release Engineering - 1.0.1-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild