Thread: little encryption

  1. #1
    Registered User
    Join Date
    Apr 2002
    Posts
    28

    little encryption

    Hi everyone

    I have implemnted an encryption program that uses pbox and sbox, I tested the p_box and it is fine. but I have a problem for testing the s_box ,it returns strange simbols

    can anyone suggest some strategy to test... or why it giveme strange simpols

    the encryption is based on this expression and it has to do 20 rounds:
    c1 = m1 + k1m3 (Mod 26)
    c2 = k2m1 + m3 (Mod 26)
    c3 = m2 + k3m4 (Mod26)
    c4 = k4m2 + m4 (Mod 26)

    the code is in the file

    thanks in advance

  2. #2
    Me want cookie! Monster's Avatar
    Join Date
    Dec 2001
    Posts
    680
    Well, I'm not sure but the value of your characters in msg3 never exceed 25 (mod 26). If you take a look at the ASCII table you can see that printing this characters will result in strange (non printable) characters.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 16
    Last Post: 11-23-2007, 01:48 PM
  2. help needed with edit control & encryption
    By willc0de4food in forum Windows Programming
    Replies: 2
    Last Post: 03-16-2006, 08:21 PM
  3. abt encryption algorithm
    By purIn in forum C Programming
    Replies: 9
    Last Post: 12-22-2003, 10:16 PM
  4. What's wrong with my Stream Cipher Encryption?
    By Davros in forum C++ Programming
    Replies: 3
    Last Post: 04-18-2002, 09:51 PM
  5. File Encryption & Read/Write in Binary Mode
    By kuphryn in forum C++ Programming
    Replies: 5
    Last Post: 11-30-2001, 06:45 PM