/usr/lib/python3/dist-packages/axolotl/kdf/derivedmessagesecrets.py is in python3-axolotl 0.1.39-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # -*- coding: utf-8 -*-
from ..util.byteutil import ByteUtil
class DerivedMessageSecrets:
SIZE = 80
CIPHER_KEY_LENGTH = 32
MAC_KEY_LENGTH = 32
IV_LENGTH = 16
def __init__(self, okm):
keys = ByteUtil.split(okm,
self.__class__.CIPHER_KEY_LENGTH,
self.__class__.MAC_KEY_LENGTH,
self.__class__.IV_LENGTH)
self.cipherKey = keys[0] # AES
self.macKey = keys[1] # sha256
self.iv = keys[2]
def getCipherKey(self):
return self.cipherKey
def getMacKey(self):
return self.macKey
def getIv(self):
return self.iv
|