Download presentation
Presentation is loading. Please wait.
Published byJoella Kelley Modified over 9 years ago
1
Monitor's Secret Key Crypto - KARN, encrypt 512 bit Secret
2
Monitor's Secret Key Crypto - KARN, encrypt 512 bit Secret Left key Right key
3
Monitor's Secret Key Crypto - KARN, encrypt 512 bit Secret Left key Right key 42 First: send out "guard byte" - the number 42 (00101010)
4
Monitor's Secret Key Crypto - KARN, encrypt 512 bit Secret Left key Right key Split plaintext block into two halves 320 bit (Padded) Plaintext Block Left block Right block
5
Monitor's Secret Key Crypto - KARN, encrypt 512 bit Secret Left key Right key Reset a SHA message digest 320 bit (Padded) Plaintext Block Left block Right block Reset Hash
6
Monitor's Secret Key Crypto - KARN, encrypt 512 bit Secret Left key Right key Update hash with plaintext left block 320 bit (Padded) Plaintext Block Left block Right block Update Hash update
7
Monitor's Secret Key Crypto - KARN, encrypt 512 bit Secret Left key Right key Update hash with left key 320 bit (Padded) Plaintext Block Left block Right block Update Hash update
8
Monitor's Secret Key Crypto - KARN, encrypt 512 bit Secret Left key Right key Create right cipher block 320 bit (Padded) Plaintext Block Left block Right block Hash Output Right Cipher Block
9
Monitor's Secret Key Crypto - KARN, encrypt 512 bit Secret Left key Right key Reset Hash 320 bit (Padded) Plaintext Block Left block Right block Reset Hash Right Cipher Block
10
Monitor's Secret Key Crypto - KARN, encrypt 512 bit Secret Left key Right key Update Hash with right cipher block 320 bit (Padded) Plaintext Block Left block Right block Update Hash Right Cipher Block update
11
Monitor's Secret Key Crypto - KARN, encrypt 512 bit Secret Left key Right key Update Hash with right key 320 bit (Padded) Plaintext Block Left block Right block Update Hash Right Cipher Block update
12
Monitor's Secret Key Crypto - KARN, encrypt 512 bit Secret Left key Right key Create left cipher block - XOR digest with left plaintext block 320 bit (Padded) Plaintext Block Left block Right block Hash Output Right Cipher Block Left Cipher Block
13
Monitor's Secret Key Crypto - KARN, encrypt 512 bit Secret Left key Right key Output left cipher block 320 bit (Padded) Plaintext Block Left block Right block Hash Output Right Cipher Block Left Cipher Block
14
Monitor's Secret Key Crypto - KARN, encrypt 512 bit Secret Left key Right key Output right cipher block 320 bit (Padded) Plaintext Block Left block Right block Hash Output Right Cipher Block Left Cipher Block
15
Monitor's Secret Key Crypto - KARN, padding Pad to last block, or pad a whole block < 320 bit Last Plaintext Block ByteArrayOutputStream buffer = new ByteArrayOutputStream(); String input = "The plaintext message to pad"; byte scratch[] = input.getBytes(); int len = input.length(); buffer.write(scratch, 0, len);
16
Monitor's Secret Key Crypto - KARN, padding Stick a 0 byte on the end < 320 bit Last Plaintext Block 0 buffer.write(0);
17
Monitor's Secret Key Crypto - KARN, padding Remaining bytes are derived from random # < 320 bit Last Plaintext Block 0 0 Random # int padlen = PADSIZE - ((len + 1) % PADSIZE); scratch[] = new byte[padlen]; SecureRandom sr = new SecureRandom(); sr.nextBytes(scratch); buffer.write(scratch, 0, padlen);
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.