Lines Matching refs:keys
50 * @brief read keys from keybuf into keys
51 * @param keybuf buffer containing the keys
52 * @param keys output key array containing the keys for encryption in
55 static void multiswap_init(const uint8_t keybuf[48], uint32_t keys[12])
59 keys[i] = AV_RL32(keybuf + (i << 2)) | 1;
63 * @brief invert the keys so that encryption become decryption keys and
65 * @param keys key array of ints to invert
67 static void multiswap_invert_keys(uint32_t keys[12])
71 keys[i] = inverse(keys[i]);
73 keys[i] = inverse(keys[i]);
76 static uint32_t multiswap_step(const uint32_t keys[12], uint32_t v)
79 v *= keys[0];
82 v *= keys[i];
84 v += keys[5];
88 static uint32_t multiswap_inv_step(const uint32_t keys[12], uint32_t v)
91 v -= keys[5];
93 v *= keys[i];
96 v *= keys[0];
102 * @param keys 32 bit numbers in machine endianness,
108 static uint64_t multiswap_enc(const uint32_t keys[12],
116 tmp = multiswap_step(keys, a);
119 tmp = multiswap_step(keys + 6, b);
126 * @param keys 32 bit numbers in machine endianness,
132 static uint64_t multiswap_dec(const uint32_t keys[12],
140 b = multiswap_inv_step(keys + 6, tmp);
143 a = multiswap_inv_step(keys, tmp);