• Breaking News

    Tuesday, February 20, 2018

    Cryptography A bunch of block cipher diagrams

    Cryptography A bunch of block cipher diagrams


    A bunch of block cipher diagrams

    Posted: 19 Feb 2018 10:21 AM PST

    I would like to generate a relatively short cryptographic fingerprint which I can embed as visible (watermark) text in images to which I own copyright, but want to remain anonymously attached to. How can I do this relatively easily?

    Posted: 19 Feb 2018 12:20 PM PST

    In the United States you don't have to do anything other than create an eligible work to be the legal copyright holder for that work.

    Proving that you are the creator is another story.

    I will soon be sharing with the internet a series of my photographs, and I want to put a small visible copyright watermark on each. The thing is, I don't want my name on them.

    The solution that I came up with was to follow the (c)opyright symbol with an as-short-as-possible string of characters which will uniquely associate that image with me by virtue of the fact that only I can decrypt the string (proving that I put it there).

    Does that make sense? What better ideas are there (for visible marks)? I only know enough about cryptography to know that this is possible.

    Thoughts? Help the n00b, please :)

    Thanks!

    submitted by /u/___--__-_-__--___
    [link] [comments]

    SWAP Cipher round design

    Posted: 19 Feb 2018 10:47 AM PST

    Apologies if there already is a 'SWAP' block cipher (and there almost certainly is one), but this design I am providing is a round design to be used for a block cipher primarily for being run in CTR mode (because encryption is not reversible).

    The round design relies on a good key scheduling mechanism (which I have not provided), if you want to build a functional cipher from this one could base it off of NSA's Speck / AES roundkeys, e.t.c.

    So, the round design primarily relies on the following operations:

    • bitwise NOT
    • Multiplication modulo 2^64
    • Exclusive-or
    • SWAP operation (see more below)

    Swap operation

    EDIT: SWAP operation is suffering from some flaws and is being changed and tested

    The swap operation takes two equal-bit values as input and produces an output of equal bitwidth, whilist maintaining the same number of 1s and 0s as in the original, the primary use of this is to achieve diffusion (since theoretically you can get from any permutation with X 1s and Y 0s in the input to any other permutation with X 1s and Y 0s in different positions in the output - and with good numbers of bits all these are equally likely it seems (which makes it perfect for achieving total diffusion)). Anyway, so on to the operation:

    As an example I will use an 8-bit input X and 8-bit input Y.

    First, we take the 1st bit of X, if the 1st bit of Y is 0 we swap the 1st bit of X with the last bit of X, if it is 1 we swap the 1st and 2nd bit, next we take the 2nd bit of X, if the 2nd bit of Y is 0 we swap the 1st and 2nd bit of X..e.t.c finally we take the last bit of X, if the last bit of Y is 0 we swap the pre-last and last bit of X, if not, we swap the last and first bit of X.

    So here are some examples with 4-bit Xs and Ys.

    X: 1100 Y: 0101

    X swap Y: 1001

    X: 1011 Y: 0100 X swap Y: 1101

    I have tested this to an extent and while at first it appears to be a lame operation achieving little diffusion, it is in fact a very powerful tool for achieving diffusion while keeping the bit count the same. So now on to the round design:

    the input to the round is a 64-bit plaintext or output from a previous round. K0 and K1 are both 128-bit keys taken from the key derivation part of the cipher (which I have not provided), we assume that K0 and K1 both have pretty good randomness & are not closely related.

    You can see the round design here

    I am not taking this very seriously, but if you do plan to use this you should leave some credit.

    NOTE: This is a round design for a block cipher to build on, and NOT a block cipher. If you feed stupid keys K0 and K1 it WILL fail, beacuse K0 and K1 is not user input, these are round keys that are based on the master key K the user provides. Given proper K0 and K1 the output should achieve good levels of confusion and diffusion of P. Also note that almost every block cipher in existence (including AES) is broken with a small number of rounds (7 out of 10 for AES-128 are broken I believe). So honestly you should use AT LEAST 8 rounds of this with a masterfully designed round key derivation mechanism if you want to properly test it (and not to mention that since it can only work in CTR mode it needs all the nonce/IV stuff to be tested properly).

    I would love to receive constructive criticism from the many smart cryptanalysts on this subreddit! Cheers!

    EDIT: See the design on GitHub here

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

    No comments:

    Post a Comment