Dinoxor
Re-implementing bitwise operations as abstractions in arm64 neon registers.
Why?
🥴 I was somehow bored and stressed at the same time.

What Is This?
This project demonstrates the use of inline assembly in Rust to implement and benchmark cryptographic algorithms, with a focus on confusing reverse engineers. It includes:
- A
dinoxormodule for obfuscated XOR operations using inline ARM64 assembly and NEON registers. - A
chacha20module for implementing the ChaCha20 stream cipher. - Benchmarking of performance differences between plaintext XOR and inline assembly-based "dinoxor".
Key Features
Inline Assembly in Rust
The project showcases how to:
- Use the
asm!macro for inline assembly - Access and manipulate registers (e.g.,
v0,w0) - Call helper functions from within assembly
- Manage input/output variables and register bindings
- Manipulate NEON registers for personal gain
ChaCha20 Implementation
- Implements the ChaCha20 stream cipher using Rust's
quickcheckfor testing. - Demonstrates how to replace insecure algorithms like RC4 with modern ciphers.
Benchmarks
Performs performance comparisons:
dinoxor(x, y)vs regular eorx ^ y.ChaCha20::process_with_dinoxorvs standard ChaCha20 implementation.
How to Use
Add as a Crate
Add this to your Cargo.toml:
[]
= "*"
Example Usage
use dinoxor;
let result = dinoxor;
assert_eq!;
Benchmarks (from cargo bench)
- Regular XOR:
~6.29 ns/iter - Dinoxor:
~7,095.95 ns/iter
See Also
Developer Notes
- This project is meant to demonstrate how inline assembly can be used for security through obscurity.
- The implementation of ChaCha20 is for educational purposes only.
License
This project is released under the MIT License.