• Breaking News

    Saturday, March 24, 2018

    Cryptography S-box size, use of multiple s-boxes

    Cryptography S-box size, use of multiple s-boxes


    S-box size, use of multiple s-boxes

    Posted: 23 Mar 2018 09:10 PM PDT

    I've been looking at various s-box implementations and have noticed that 8 and 4 bit sboxes are relatively common in block ciphers. Of course there is an increased memory/performance cost the larger the sbox.

    I found a paper proposing a 16 bit sbox filled much the same way as AES's sbox and it got me thinking, what are the strength advantages to using a larger sbox over a smaller one? Does it just increase diffusion and reduce the number of rounds required vs a smaller sbox or are there other cryptographic advantages (ignoring speed/cost)?

    My next question is, would using multiple sboxes either by adding a second sbox step within the round schedule, or selecting the sbox each round from multiple options) ruin the carefully planned design of an sbox? Ie. is it critical to only have one sbox in use for it to be most effective at resisting attacks like differential cryptanalysis?

    submitted by /u/GrumpyWhale
    [link] [comments]

    Multiple encryption?

    Posted: 24 Mar 2018 02:12 AM PDT

    I'm a 16 year old who's interested in cryptography. So why don't we encrypt a file then encrypt it again with a separate algorithm? Like for example first AES then blowfish? Please explain it in layman's terms as I couldn't find an article online in simple terms.

    submitted by /u/imgayaf04
    [link] [comments]

    [History] Cracking a medieval code

    Posted: 23 Mar 2018 03:39 AM PDT

    Is this encryption enough for my personal files?

    Posted: 23 Mar 2018 02:50 PM PDT

    I've finally finished coding the command line app to encrypt my files before uploading them to the cloud.
    I was wondering what you think about the encryption method that I'm using.
     
    To encrypt folder names, I'm using an encrypted txt file that acts as a database, which contains all the directory names, each mapped to 4 letter words.
    Those words are generated randomly using a 145 valid-character array (which allows more than 442 million possible names).
     
    To encrypt file names, I'm using Node's 'crypto' module with the 'aes-256-cbc' algorithm (I know that xsalsa and chacha20 are better but that was the best I could implement).
     
    This is part of the code for that:
     
    let iv = crypto.randomBytes(IV_LENGTH);
    let cipher = crypto.createCipheriv('aes-256-cbc', new Buffer(self.key), iv);
    let encrypted = cipher.update(text);
     
    As you see, I'm using a random IV, but before storing that IV in the name, I shuffle it:
     
    iv = self.getShuffledIv(iv.toString('hex'));
    iv = new Buffer(iv, 'hex');
    iv = iv.toString('base64');
     
    var base64Str = iv + encrypted.toString('base64');
     
    The shuffle function basically uses an array like: const IV_SHUFFLE_MAP = [13,9,5,22,1...
    Which acts like a password for the IV.
     
    For the files' content, I'm using aes-256-cbc again, and as I wasn't able to include the IV inside the files, I'm reusing the IV from the name.
    But don't panic! It's a hashed version of the IV (salted, with sha-512).
     
    var input = fs.createReadStream(sourcePath);
    var output = fs.createWriteStream(targetPath);
    var cipher = crypto.createCipheriv('aes-256-cbc', self.key, new Buffer(hashedIVHex, 'hex'));
     
    I know it's kinda amateur, and that much better stuff could be coded, but do you think this could be reasonably enough?
    Thanks!

    submitted by /u/Speckart
    [link] [comments]

    No comments:

    Post a Comment