All Projects → aczid → Crypto1_bs

aczid / Crypto1_bs

Bitsliced Crypto-1 brute-forcer

Programming Languages

c
50402 projects - #5 most used programming language
c99
33 projects

Projects that are alternatives of or similar to Crypto1 bs

Stream Ciphers
Collection of stream cipher algorithms
Stars: ✭ 127 (-9.29%)
Mutual labels:  cryptography
Sodium Plus
Developer-friendly libsodium interface
Stars: ✭ 132 (-5.71%)
Mutual labels:  cryptography
Sheep Wolf
Wolves Among the Sheep
Stars: ✭ 138 (-1.43%)
Mutual labels:  cryptography
Libsodium Doc
Gitbook documentation for libsodium
Stars: ✭ 129 (-7.86%)
Mutual labels:  cryptography
Botan
Cryptography Toolkit
Stars: ✭ 1,798 (+1184.29%)
Mutual labels:  cryptography
Padding Oracle Attacker
🔓 CLI tool and library to execute padding oracle attacks easily, with support for concurrent network requests and an elegant UI.
Stars: ✭ 136 (-2.86%)
Mutual labels:  cryptography
Embedded Ide
IDE for C embedded development centered on bare-metal ARM systems
Stars: ✭ 127 (-9.29%)
Mutual labels:  gcc
Trussed
Modern Cryptographic Firmware
Stars: ✭ 140 (+0%)
Mutual labels:  cryptography
Useful Crypto Resources
A place for useful crypto-related resources plus some of my fav stuff
Stars: ✭ 131 (-6.43%)
Mutual labels:  cryptography
Mstar Bin Tool
Scripts to manipulate Mstar firmware binaries (e.g. MstarUpgrade.bin, LetvUpgrade.bin etc)
Stars: ✭ 137 (-2.14%)
Mutual labels:  cryptography
Merkle Tree
Merkle Trees and Merkle Inclusion Proofs
Stars: ✭ 130 (-7.14%)
Mutual labels:  cryptography
Setup
Setup a new machine without sudo!
Stars: ✭ 130 (-7.14%)
Mutual labels:  gcc
Cli
🧰 A zero trust swiss army knife for working with X509, OAuth, JWT, OATH OTP, etc.
Stars: ✭ 2,151 (+1436.43%)
Mutual labels:  cryptography
Demo Twilio Backend Nodejs
A sample backend that demonstrates how to generate a Virgil JWT and Twilio token used for authentication with the Virgil and Twilio services
Stars: ✭ 128 (-8.57%)
Mutual labels:  cryptography
Crypto Rnn
Learning the Enigma with Recurrent Neural Networks
Stars: ✭ 139 (-0.71%)
Mutual labels:  cryptography
Torchbear
🔥🐻 The Speakeasy Scripting Engine Which Combines Speed, Safety, and Simplicity
Stars: ✭ 128 (-8.57%)
Mutual labels:  cryptography
Tiny Keccak
An implementation of Keccak derived functions specified in FIPS-202, SP800-185 and KangarooTwelve
Stars: ✭ 134 (-4.29%)
Mutual labels:  cryptography
Yrssf
一个分布式(p2p)云教学/云课堂/直播平台系统CMS,睿易派的开源替代品
Stars: ✭ 141 (+0.71%)
Mutual labels:  cryptography
Openabe
The OpenABE library - open source cryptographic library with attribute-based encryption implementations in C/C++
Stars: ✭ 140 (+0%)
Mutual labels:  cryptography
Curv
Rust language general purpose elliptic curve cryptography.
Stars: ✭ 138 (-1.43%)
Mutual labels:  cryptography

Bitsliced Crypto-1 brute-forcer

A pure C(99) implementation of the Crypto-1 cipher using the method of bitslicing, which uses GNU vector extensions to be portable across SSE/AVX/AVX2 supporting architectures while offering the highest amount of possible parallelism.

Background

I wrote this as a patch for piwi's imlementation of the research documented in Ciphertext-only cryptanalysis on hardened Mifare Classic cards after reading (most of) the paper, while it was still under active development.

After my development of a somewhat naive brute-forcer, another implementation of the same attack surfaced, CraptEV1. With all of its clever tricks that code pushed me to improve my own, eventually reaching a significant (8-10x) speedup. Besides that, its publication as a library also inspired the included libnfc application that demonstrates the CraptEV1 attack code + my bitsliced cracker.

The proxmark3 patch, as well as the code for piwi's branch that it applies to, have since been merged into Iceman1001's fork along with many other experimental improvements to the proxmark3 codebase. Much more work has been done in the project since my patch, so I would advise proxmark3 users to use that fork to test the code. My original patch is included for completeness as pwpiwi_proxmark3_hard_nested.patch.

Even later still, this code actually got merged into the upstream Proxmark3 codebase! More importantly, it was included as part of an entirely new variation on the attack by @pwpiwi, which requires fewer nonces and achieves a better reduction of potential states, while also improving the brute-forcing phase, ending up as another order of magnitude faster in practice. This improved solution is also usable with a branch of mfoc by @vk496.

Tools

The following tools are only available for / tested on 64-bit Linux. Support for 32-bit and 64-bit machines was tested on various Intel/ARM based Linux platforms. OSX compatibility issues were resolved by @unkernet.

If you want to use the following stand-alone binaries, you will need the original CraptEV1 / Crapto1 source packages. For convenience, and because redistribution of CraptEV1 is not allowed, I've added make targets get_craptev1 and get_crapto1 to fetch and extract these packages to the current working directory. I have included a conversion of the test file 0xcafec0de.txt included in the CraptEV1 package to the binary format used by the proxmark3/hard_nested branch.

solve_bs is analogous to CraptEV1 solve and works on .txt files using the bitsliced crypto-1 cracker

$ ./solve_bs craptev1-v1.1/0xcafec0de.txt 0xcafec0de

solve_piwi uses CraptEV1 on .bin files as gathered by piwi's PM3 code

$ ./solve_piwi 0xcafec0de.bin

solve_piwi_bs does the same but uses the bitsliced cracker

$ ./solve_piwi_bs 0xcafec0de.bin

libnfc_crypto1_crack uses libnfc to demonstrate the CraptEV1 code using the bitsliced cracker

$ ./libnfc_crypto1_crack 000000000000 0 A 4 A

Acknowledgements

Special thanks to Carlo Meijer, Roel Verdult, piwi and bla.

License

All the code in this repository is made available under the MIT license, except for the files pwpiwi_proxmark3_hard_nested.patch and libnfc_crypto1_crack.c, which are GPLv2 due to deriving from respectively Proxmark3 and MFOC.

Copyright (c) 2015-2016 Aram Verstegen

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].