Coder Social home page Coder Social logo

des-ecb's Introduction

DES-ECB

Data Encryption Standard (DES) ECB Mode based on C++ bitset

(for education only) Input and output like this:

Data Encryption Standard (DES) ECB Mode (zero padding) 
(Designed for network security course homework)        
Do you want to encrypt or decrypt?
  [E]ncrypt (default)
  [D]ecrypt
E
Plaintext to be encrypted (in one line) : 
hello world
Select the type of PLAINTEXT you enter:
  [S]tring (default)
  [H]ex
s

The length of the plaintext you typed in: 11
Key for encryption:
1234567890abcdef
Select the type of KEY you enter:
  [S]tring (default)
  [H]ex
h
The length of the key you typed in: 16

After initial permutation:
df40ded200ff9dd0
0701060000070201

block [0]
df40ded200ff9dd0


  round [1]
  left:
00000000
11111111
10011101
11010000
  right:
00111011
01011011
00110010
11011110

......

Swap left and right:
57cfe68fe4fabf53

after IP^-1:
5b7fdd396aacf6bd

Encryption result (hex):
5b7fdd396aacf6bd
c19c253125329482

The plaintext you typed in (hex):
68656c6c6f20776f
726c640000000000

des-ecb's People

Contributors

sorbose avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.