Example #1
0
        public MessageKeys GetMessageKeys()
        {
            byte[] inputKeyMaterial           = GetBaseMaterial(MESSAGE_KEY_SEED);
            byte[] keyMaterialBytes           = kdf.DeriveSecrets(inputKeyMaterial, Encoding.UTF8.GetBytes("WhisperMessageKeys"), DerivedMessageSecrets.SIZE);
            DerivedMessageSecrets keyMaterial = new DerivedMessageSecrets(keyMaterialBytes);

            return(new MessageKeys(keyMaterial.GetCipherKey(), keyMaterial.GetMacKey(), keyMaterial.GetIv(), index));
        }
Example #2
0
        public MessageKeys GetMessageKeys()
        {
            byte[] inputKeyMaterial           = GetBaseMaterial(MessageKeySeed);
            byte[] keyMaterialBytes           = _kdf.DeriveSecrets(inputKeyMaterial, Encoding.UTF8.GetBytes("WhisperMessageKeys"), DerivedMessageSecrets.Size);
            DerivedMessageSecrets keyMaterial = new DerivedMessageSecrets(keyMaterialBytes);

            return(new MessageKeys(keyMaterial.GetCipherKey(), keyMaterial.GetMacKey(), keyMaterial.GetIv(), _index));
        }