• Breaking News

    Monday, March 26, 2018

    Cryptography Are there "dual plain text" crypto systems?

    Cryptography Are there "dual plain text" crypto systems?


    Are there "dual plain text" crypto systems?

    Posted: 25 Mar 2018 05:53 AM PDT

    Are there crypto systems that take two plain texts A and B along with two keys k_a and k_b and merge them into a single cipher text in such a way that when decrypting under key_a or key_b yields A or B respectively, but does not ease decryption of the other plain text?

    My imagined situation is that you encrypt your secret text with a "dummy text". Then if the need arises, you can comply with a demand for the encryption key by handing over the dummy key, which unlocks the dummy plain text while keeping the real secret text hidden.

    Now, I imagine this wouldn't be too useful in practice because the attacker would recognize that you're using this strategy and demand both keys. I'm still interested in the theory behind such a scheme though (if it exists!)

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

    Encrypting/decrypting numbers with modular multiplicative inverses

    Posted: 25 Mar 2018 02:43 AM PDT

    Let's say I have 2048 random numbers, from 1 to 2048, and I need 24 of them (repeats are allowed) to generate a private key hash that only I can know. I want to write these numbers on a piece of paper and put it in a safe. But before I do that, I want to encrypt them, so if anyone cracks open my safe, he won't be able to generate the private key with those 24 numbers, unless he decrypts them first.

    So let's say these are my 24 numbers n:

    1161, 782, 1576, 782, 1881, 1732, 259, 1122, 724, 1091, 1650, 1301, 908, 487, 545, 1994, 367, 1128, 1288, 1486, 2018, 1634, 1961, 1943 

    To encrypt each one, I would use a modulo m larger than 2048 to prevent collisions, and a number x relatively prime (coprime) to m which I would multiply n with, for example, m=90000 and x=19921117, so that:

    n_encrypted = n * x % m 

    For the 24 numbers above, this would yield:

    n n_encrypted
    1161 36837
    782 33494
    1576 80392
    782 33494
    1881 31077
    1732 74644
    259 49303
    1122 83274
    724 28708
    1091 18647
    1650 43050
    1301 73217
    908 84236
    487 33979
    545 38765
    1994 37298
    367 79939
    1128 89976
    1288 28696
    1486 69862
    2018 64106
    1634 85178
    1961 437
    1943 70331

    Now to decrypt this, I would first calculate the modular multiplicative inverse (mpi) of m and x, 90000 and 19921117, which is 22453, so that:

    n = n_encrypted * mpi % m 

    Now, this is obviously easy for me to decrypt because I know both the modulo (90000) and the coprime (19921117) I used, but what if someone does not know them - how long would it take to bruteforce with modern computers (assuming they know they can decrypt with a modular multiplicative inverse) all possible combinations of 1: moduli between 89976 (largest n_encrypted value) and 90000 and 2: all their coprime numbers >90000 up to let's say, 1000000 (1 million)? What about up to 1000000000 (1 billion)? What if the modulo range goes up to 9000000? Would something like this take days or years to decrypt, in other words, is such encryption relatively secure today? If so, up from which modulo/coprime range: millions, billions, less, more?

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

    No comments:

    Post a Comment