Lines Matching defs:keys
49 * @brief read keys from keybuf into keys
50 * @param keybuf buffer containing the keys
51 * @param keys output key array containing the keys for encryption in
54 static void multiswap_init(const uint8_t keybuf[48], uint32_t keys[12])
58 keys[i] = AV_RL32(keybuf + (i << 2)) | 1;
62 * @brief invert the keys so that encryption become decryption keys and
64 * @param keys key array of ints to invert
66 static void multiswap_invert_keys(uint32_t keys[12])
70 keys[i] = inverse(keys[i]);
72 keys[i] = inverse(keys[i]);
75 static uint32_t multiswap_step(const uint32_t keys[12], uint32_t v)
78 v *= keys[0];
81 v *= keys[i];
83 v += keys[5];
87 static uint32_t multiswap_inv_step(const uint32_t keys[12], uint32_t v)
90 v -= keys[5];
92 v *= keys[i];
95 v *= keys[0];
101 * @param keys 32 bit numbers in machine endianness,
107 static uint64_t multiswap_enc(const uint32_t keys[12],
115 tmp = multiswap_step(keys, a);
118 tmp = multiswap_step(keys + 6, b);
125 * @param keys 32 bit numbers in machine endianness,
131 static uint64_t multiswap_dec(const uint32_t keys[12],
139 b = multiswap_inv_step(keys + 6, tmp);
142 a = multiswap_inv_step(keys, tmp);