blob: 8626f4bbe813fdb1eb98326ef8d7255d6a79b7fa [file] [log] [blame]
Neels Hofmeyr17518fe2017-06-20 04:35:06 +02001/*! \file comp128.h
2 * COMP128 header.
Harald Welteec8b4502010-02-20 20:34:29 +01003 *
4 * See comp128.c for details
5 */
6
Sylvain Munaut12ba7782014-06-16 10:13:40 +02007#pragma once
Harald Welteec8b4502010-02-20 20:34:29 +01008
9#include <stdint.h>
10
Max1f9d8182016-04-21 17:12:40 +020011#include <osmocom/core/defs.h>
12
Harald Welteec8b4502010-02-20 20:34:29 +010013/*
Max1f9d8182016-04-21 17:12:40 +020014 * Performs the COMP128v1 algorithm (used as A3/A8)
Harald Welteec8b4502010-02-20 20:34:29 +010015 * ki : uint8_t [16]
16 * srand : uint8_t [16]
17 * sres : uint8_t [4]
18 * kc : uint8_t [8]
19 */
Max1f9d8182016-04-21 17:12:40 +020020void comp128v1(const uint8_t *ki, const uint8_t *srand, uint8_t *sres, uint8_t *kc);
21
22void 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");