ike.util package

Submodules

ike.util.cipher module

class ike.util.cipher.AES(key, iv=None)

Bases: ike.util.cipher._Cipher

algorithm

alias of AES

class ike.util.cipher.Camellia(key, iv=None)

Bases: ike.util.cipher._Cipher

algorithm

alias of Camellia

ike.util.cipher.pad(data, blocksize=16)

Pads data to blocksize according to RFC 4303. Pad length field is included in output.

ike.util.conv module

ike.util.conv.to_bytes(x)

ike.util.dh module

class ike.util.dh.DiffieHellman(group=14, n=64)

Bases: builtins.object

derivate(other_key)
generate_private_key(n)
generate_public_key()
generator = 2
shared_secret

ike.util.dump module

ike.util.dump.dump(src)

Returns data in hex format in groups of 4 octets delimited by spaces for debugging purposes.

ike.util.external module

ike.util.external.run_setkey(input)

Runs a script through the ‘setkey’ command that is a user space insterface for PFKEY. :param input: setkey configuration file contents.

ike.util.prf module

ike.util.prf.prf(key, data, hash_algorithm='sha256')
ike.util.prf.prfplus(key, data, n)

ike.util.pubkey module

ike.util.pubkey.sign(data, filename, hash_alg='SHA-256')
ike.util.pubkey.verify(data, signature, filename)

Module contents