Dial-up cipher?

I am looking for a commutative cipher, i.e.

E(K₁,E(K₂,P)) = E(K₂,E(K₁,P))

but not associative - this

E(K,P) ≠ E(P,K)

This excludes XOR, which would otherwise be normal.

A symmetric cipher would be preferable, but an asymmetric cipher would also work.

The main protocol that I want to implement is:

  • Alice has a list of tokens (32-bit integers), and she encrypts each token with the same key (K0)
  • Alice sends a list of encrypted tokens to Bob
  • Bob randomizes the list, encrypts each token with a separate key (K1 - Kn), calls each token and returns the list to Alice.
  • Alice decrypts each token using K0, leaving her with a list of tokens, each of which is encrypted with a separate key (K1 - Kn)
  • After some time, Bob sends Alice the key for a specific label (Kx)
  • Kx, x
  • , K0, , .

- , , ?

, . , .

Clojure, Java . , .

+5
3

, "Mental Poker" (, , , ).

SRA . , , , RSA, , e d . :

(P e1) e2 == (P e2) e1

+3

hobbiest , #. .

" ", SECURITY NOW?

... # 33 | 30 2006 | 43 .

https://www.grc.com/sn/sn-033.txt

... ... Puzzler/BrainTeaser, "", , , , . ...

, ALICE XOR . , , XORing I , , .

... BOB msg . ALICE BOB, msg . ALICE BOB. BOB ALICE msg . BOB ALICE. . ALICE BOB, . , 'xor'ing .

, .

, , 'm'. m - hex 6d 01101101.  - hex c2 11000010 - "m", bob, alice. ø is hex d8 11011000 - "Â", bob '£' . £ - hex a3 10100011, alice "m" . m - alice . . xors  ø. 11000010 '' ' 11011000 'ø' 00011010 xor result = 1a . , "E" hex 45 01001001

alice.

, PGP .. , , .

, . - WINDOWS #.NET / , /.

.

PLAIN .

BOB kZtOfS0kKqcRLjTNPh7OjcJKZZFLjmm5OVm02YlrBQN0zI9SxOD1zJjQcpetUbX

BOB CIPHER TEXT TO ALICE. 1IÎ.8Ío # "ëìAùJ

ALICE KEY O1yfuV7MpX3n4wtefUhr6YctRaeCcrrzH7LqLNRUQCMVZuL5Mr0Bw3qMeIT92hg

ALICE CIPHER BOB μRÖ³ # , fzkÆaå

, = . øqqøð < ª > P & @<, , ... .

0

- , AES OFB ( ). IV ( ) AES . XORed . ( , XORed ) , XOR . , , . http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Output_Feedback_.28OFB.29

0

All Articles