https://github.com/charlespascoe/padding-oracle-demo
A TypeScript demonstration of a Padding Oracle Attack
https://github.com/charlespascoe/padding-oracle-demo
crypto demo security typescript
Last synced: about 2 months ago
JSON representation
A TypeScript demonstration of a Padding Oracle Attack
- Host: GitHub
- URL: https://github.com/charlespascoe/padding-oracle-demo
- Owner: charlespascoe
- License: mit
- Created: 2019-02-03T18:48:56.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-19T12:07:46.000Z (over 7 years ago)
- Last Synced: 2025-06-23T09:15:21.352Z (12 months ago)
- Topics: crypto, demo, security, typescript
- Language: TypeScript
- Homepage:
- Size: 171 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Padding Oracle Demo
A TypeScript demonstration of a [Padding Oracle Attack](https://robertheaton.com/2013/07/29/padding-oracle-attack/).
It can decrypt all but the first block of encrypted data using only a padding oracle. If the first blocks of a ciphertext/plaintext pair is known, the IV can be computed, which can be used for full decryption of other messages.
Run `npm install` to install dependencies and then `npm run demo` to run the demo, or just `ts-node index.ts` if you already have `ts-node` globally installed. I know it may seem pointless only having TypeScript as a dependency, but hey, I like [TypeScript](https://www.typescriptlang.org/).
Output when run:
