Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 1 | /* |
| 2 | * COMP128 header |
| 3 | * |
| 4 | * See comp128.c for details |
| 5 | */ |
| 6 | |
Sylvain Munaut | 12ba778 | 2014-06-16 10:13:40 +0200 | [diff] [blame] | 7 | #pragma once |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 8 | |
| 9 | #include <stdint.h> |
| 10 | |
Max | 1f9d818 | 2016-04-21 17:12:40 +0200 | [diff] [blame] | 11 | #include <osmocom/core/defs.h> |
| 12 | |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 13 | /* |
Max | 1f9d818 | 2016-04-21 17:12:40 +0200 | [diff] [blame] | 14 | * Performs the COMP128v1 algorithm (used as A3/A8) |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 15 | * ki : uint8_t [16] |
| 16 | * srand : uint8_t [16] |
| 17 | * sres : uint8_t [4] |
| 18 | * kc : uint8_t [8] |
| 19 | */ |
Max | 1f9d818 | 2016-04-21 17:12:40 +0200 | [diff] [blame] | 20 | void comp128v1(const uint8_t *ki, const uint8_t *srand, uint8_t *sres, uint8_t *kc); |
| 21 | |
| 22 | void comp128(const uint8_t *ki, const uint8_t *srand, uint8_t *sres, uint8_t *kc) OSMO_DEPRECATED("Use generic API from osmocom/crypt/auth.h instead"); |