Crypto Wiki

Template:About Template:Infobox block cipher In cryptography, ABC is a block cipher designed in 2002 by Dieter Schmidt[1].

ABC is a substitution-permutation network comprising 17 rounds with 3 different kinds of round functions. The first 8 rounds use XORs, modular multiplications as in MMB, and an expanded version of the pseudo-Hadamard transform (PHT) from SAFER. The middle round uses just XORs and multiplications. The final 8 rounds are similar to the first 8, but using the inverse PHT. ABC's block size of 256 bits and key size of 512 bits are both larger than in typical block cipher algorithms. The key schedule is very simple: 256-bit round keys are taken from the key, which is rotated by a fixed amount in each round.

Sample implementation[]

This Python implementation is used in the Encryption Module Pycrypto:

#implementation by douglas funnie used in pycrypto
def MAKEITABC(string,key):
    key         = key+(key[-1]*17)[:17]
    string      = string+("\x00"*(len(string)-len(key)))
    output      = ''
    #SPLIT INTO EVEN LENGTH STRINGS USING Pseudo-Hadamard transform 
    dfhusion    = key[:len(key)/2],key[len(key)/2:]
    salt        = dfhusion[0]+dfhusion[1]+dfhusion[0]+(2*dfhusion[1])[:17]#y
    location    = 0
    for x in range(1,17):
        if location >= x:
            location -= 17
        #GET LETTAR
        startKey = string[location]
        #XOR BY KEY
        startKey = chr(ord(startKey)^ord(salt[location]))
        #OG-MMB BY LOC
        startKey = chr(ord(startKey)%(location+1))
        if x == 8:
            salt    = salt[::-1]
        elif x > 8:
        #ADD TO KEY
        output  += startKey
    return output


  • Template:Cite paper


it:ABC (cifrario) ru:ABC (криптография)