def _make_master_key(self): """ Make the master key by (1) combining the credentials to create a composite hash, (2) transforming the hash using the transform seed for a specific number of rounds and (3) finally hashing the result in combination with the master seed. """ super(KDB4File, self)._make_master_key() composite = sha256(''.join(self.keys)) tkey = transform_key(composite, self.header.TransformSeed, self.header.TransformRounds) self.master_key = sha256(self.header.MasterSeed + tkey)
def _make_master_key(self): """ Make the master key by (1) combining the credentials to create a composite hash, (2) transforming the hash using the transform seed for a specific number of rounds and (3) finally hashing the result in combination with the master seed. """ super(KDB4File, self)._make_master_key() composite = sha256(''.join(self.keys)) tkey = transform_key( composite, self.header.TransformSeed, self.header.TransformRounds) self.master_key = sha256(self.header.MasterSeed + tkey)
def _make_master_key(self): """ Make the master key by (1) combining the credentials to create a composite hash, (2) transforming the hash using the transform seed for a specific number of rounds and (3) finally hashing the result in combination with the master seed. """ super(KDB3File, self)._make_master_key() #print "masterkey:", ''.join(self.keys).encode('hex') #composite = sha256(''.join(self.keys)) #TODO python-keepass does not support keyfiles, there seems to be a # different way to hash those keys in kdb3 composite = self.keys[0] tkey = transform_key(composite, self.header.MasterSeed2, self.header.KeyEncRounds) self.master_key = sha256(self.header.MasterSeed + tkey)