Skip to main content

phoenixAES: a tool to perform differential fault analysis attacks (DFA) against AES

Currently phoenixAES contains the following ciphers and fault models:

See https://blog.quarkslab.com/differential-fault-analysis-on-white-box-aes-implementations.html for more background.

Installation

There is no dependencies, it requires only Python 3.

python3 -m pip install phoenixAES

Usage

It takes a file of recorded outputs, optionally preceded by inputs (which will be ignored). First record must be with the correct output, to be used as reference.
E.g. for AES:

#!/usr/bin/env python3
import phoenixAES

with open('tracefile', 'wb') as t:
    t.write("""
74657374746573747465737474657374 BF9B06F11DF478145B8300FE440B0D06
74657374746573747465737474657374 BF9BDDF11D527814568300FE440B0DFA
74657374746573747465737474657374 BF9BF9F11DAC78145F8300FE440B0D67
74657374746573747465737474657374 BF9BF0F11DBB78140C8300FE440B0DEE
74657374746573747465737474657374 BF9BF9F11DAC78145F8300FE440B0D67
74657374746573747465737474657374 BF9B69F11DBD7814E68300FE440B0DAE
74657374746573747465737474657374 BF9BF0F11DBB78140C8300FE440B0DEE
74657374746573747465737474657374 BF9B90F11D4178149D8300FE440B0DE2
74657374746573747465737474657374 BF9BCFF11D0478140E8300FE440B0D28
74657374746573747465737474657374 FD9B06F11DF478E15B831AFE44C40D06
74657374746573747465737474657374 BA9B06F11DF4787B5B83E8FE44020D06
74657374746573747465737474657374 579B06F11DF478565B8364FE446F0D06
74657374746573747465737474657374 579B06F11DF478565B8364FE446F0D06
74657374746573747465737474657374 BF9B065C1DF4B6145B1800FE9E0B0D06
74657374746573747465737474657374 BF9B065C1DF4B6145B1800FE9E0B0D06
74657374746573747465737474657374 BF9B06251DF454145BC200FE060B0D06
74657374746573747465737474657374 BF9B06941DF4C3145BFB00FED20B0D06
74657374746573747465737474657374 BF9B12F11D977814DD8300FE440B0D21
74657374746573747465737474657374 BF9B90F11D4178149D8300FE440B0DE2
74657374746573747465737474657374 BF9BCFF11D0478140E8300FE440B0D28
74657374746573747465737474657374 BF9BDDF11D527814568300FE440B0DFA
74657374746573747465737474657374 BFFB06F1E2F478145B8300AB440B7906
74657374746573747465737474657374 BF5D06F142F478145B830049440B7306
""".encode('utf8'))

phoenixAES.crack_file('tracefile')

After ~50 ms:

Last round key #N found:
D014F9A8C9EE2589E13F0CC8B6630CA6

For two single faults in round 8:

#!/usr/bin/env python3
import phoenixAES

with open("r8faults", "w") as f:
    f.write("bf9b06f11df478145b8300fe440b0d06\n")
    f.write("fdfbf95ce2acb6e15f181aab9ec47967\n")
    f.write("ba5df02542bb547b0cc2e849060273ee\n")
phoenixAES.convert_r8faults_file("r8faults", "r9faults")
phoenixAES.crack_file("r9faults")

After ~50 ms:

Last round key #N found:
D014F9A8C9EE2589E13F0CC8B6630CA6

Metadata

Release files for phoenixAES 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for phoenixAES 0.0.5
File Size Uploaded Provenance
phoenixAES-0.0.5.tar.gz 24.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for phoenixAES 0.0.5
File Interpreter ABI Platform
phoenixAES-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 48.3 kB

Release files / phoenixAES-0.0.5.tar.gz

Download URL phoenixAES-0.0.5.tar.gz
Size 24.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a75d487b3ce7b18597b11a2b56447bfbe6c9d9f99db2b6b5fb597bb4d7d71af1
BLAKE2b-256 checksum
How to use checksums
afa17c4f5cb4426421498686ebf6f8d67b19dd658ba41dae0ca47a4feba3e1df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release files / phoenixAES-0.0.5-py3-none-any.whl

Download URL phoenixAES-0.0.5-py3-none-any.whl
Size 23.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
61d29ca7a64739965dc9c976277f8caea2db663e4783135c54f45bee2720585a
BLAKE2b-256 checksum
How to use checksums
24ef49d31a8b0c2e25bfef9f1134425851994388d44f0639744899b683e9e4ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Security for phoenixAES 0.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page