Comments (1)
AES always operates on blocks of 16 bytes so inputs must be padded if they don't land on a block boundary. OpenSSL has some clever tricks to do this automatically without having to store the unpadded length externally, but it can be disabled with -nopad
to operate on raw blocks. I'm not sure where 6c cc cd c8 60 8c 80
or 6c cc cd c8 60 8c 80 ef 69 8c 99 e4 a4 9a d5 ad
came from as I get neither of those from encrypting foo-bar
with the given key.
I can verify bbe8d48c0f5b9aca2e460ed3253a67e3
does decrypt to foo-bar
(plus padding) however:
# decrypting
echo 'bbe8d48c0f5b9aca2e460ed3253a67e3' | xxd -r -p | openssl enc -d -nopad -aes-256-ecb -K $(echo 'aWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWk=' | base64 -d | xxd -p -c 0) | xxd
# 00000000: 666f 6f2d 6261 7209 0909 0909 0909 0909 foo-bar.........
# NOTE the trailing 09s: these are special bytes telling OpenSSL to remove the last 9 bytes because they are padding
# they only appear in the output because -nopad is specified
# encrypting
echo -n 'foo-bar' | openssl enc -nopad -aes-256-ecb -K $(echo 'aWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWk=' | base64 -d | xxd -p -c 0) | xxd
# 00000000: bbe8 d48c 0f5b 9aca 2e46 0ed3 253a 67e3 .....[...F..%:g.
from repak.
Related Issues (16)
- pak version 12 support?
- Unpack multiple at once HOT 2
- ghostrunner 2 demo fails to parse HOT 6
- Create debug summary command for easier troubleshooting
- I can't unpack the Pak container. HOT 1
- repak.exe keeps closing when opening HOT 6
- how to use HOT 1
- 4.11 paks now don't load properly as of latest update HOT 6
- compressed paks cannot be loaded by game HOT 5
- C# bindings HOT 1
- Crate? HOT 2
- [Not Working] Not unpack dead by daylight (UE 5.2.1) pak files HOT 4
- Feat.req. Enable Github Discussions tab
- Feat.req. Add flag to choose recompression levels & blocksize if supported
- Feat.req. Writing Oodle compression support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from repak.