sagemath
Auth/lab ref: Computer algebra and number-theory environment for cryptanalysis scripting.
v2026.11.13-21cd5683 installs+3 in 7 days39 StarsGPL-3.0synced 10 hours ago
Install
No NotHoly CLI yet? Install it first.
$ curl -fsSL https://notholy.com/install.sh | sh$ notholy skills install aeondave/sagemathWrites to ~/.notholy/skills after checking the signature and the SHA-256.
SignatureSigned, ed25519
Package4cfb0bdd…8e4bfd8d
4cfb0bdde4c7…73868e4bfd8d3 files · 4.3 KBScanLowno findings
Sourcegithub.com/AeonDave/malskill/tree/main/offensive-tools/cryptography/sagemath@21cd568
On this page
Sage is the go-to environment for mathematical cryptanalysis and attack modeling. Use it when standard scripting is not enough for algebraic structures and lattice workflows.
Typical use cases
- Finite field computations (
GF, extension fields). - Polynomial rings and elimination/resultants.
- Elliptic curve arithmetic and discrete-log style tasks.
- Lattice modeling (
matrix,LLL) for partial leakage recovery. - Fast prototyping of attack math before operationalizing in Python.
Invocation modes
# REPL
sage
# Run .sage script
sage solver.sage
# Run Python file with Sage runtime
sage -python solver.py
# Jupyter with Sage kernel
sage -n jupyterPractical workflow
- Parse input values (files, network output, pubkeys).
- Model algebra in Sage-native structures (
GF, rings, curves, matrices). - Validate with small synthetic tests.
- Execute full solve, export recovered secrets to plain Python bytes/ints.
- Integrate with
pwntoolsor service scripts for secret recovery.
Common cryptanalysis patterns
From real-world cryptanalysis work, common patterns include:
from sage.all import *alongsidepwntoolsremote interaction.- Factoring and formatting factorization answers for oracle protocols.
- Elliptic curve order / point lifting / discrete-log solves.
- Lattice assembly via identity/augment/stack +
LLL(). - Finite-field polynomial construction and resultant-based elimination.
.sagesolvers combining bitwise transforms, polynomial operations overGF(2^N), and iterative remote interaction rounds.
Output hygiene
- Convert Sage integers to Python ints before serialization.
- Convert numeric secrets to bytes with explicit endianness/length handling.
- Keep deterministic seeds/options when random components appear.
Resources
references/python-sage-scripts.md— authoritative patterns for.sageandsage -pythonworkflows, imports, interoperability, and pitfalls.references/cryptanalysis-patterns.md— practical cryptanalysis templates (GF, EC, lattice, polynomial elimination) grounded in real solver style.
Files in this version
references/27.3 KB
- cryptanalysis-patterns.md5.3 KB
- python-sage-scripts.md2.0 KB
- SKILL.md2.3 KB
Permissions
| Permission | Declared | Found by the scan |
|---|---|---|
| Reads files | No | No |
| Writes files | No | No |
| Runs shell commands | Yes | Yes |
| Uses the network | No | No |
| Uses connectors | No | No |
| Drives a browser | No | No |
Scan findings
Reviewed on Nov 13, 2026
The scan found nothing to flag in this version.
A clean scan lowers the risk but does not prove a package is safe. Read what you install.
| Version | Published | Commit | SHA-256 | Signature | Permission change |
|---|---|---|---|---|---|
| v2026.11.13-21cd568 | Nov 13, 2026 | 21cd568 | 4cfb0bdd | Signed | – |
More from AeonDave
All from this publisherMore in Cryptography and Web3
See the categoryAsk anything your scope allows.
Create an account, add credits and ask the first question in the chat or the terminal.
- 1/3
Create the account
Individual or company. You can switch to a company later without losing balance or keys.
IndividualCompany - 2/3
Add credits
By card. Pay per token, no subscription.
$5.00minimum deposit - 3/3
Ask
In the chat, or install the CLI and run notholy login in your terminal.
$ notholy login