libosmocore/src/gsm
Vadim Yanitskiy ecaf5faa79 gsm0808: fix: do not encode invalid encryption algorithm
According to 3GPP TS 48.008, section 3.2.2.44, the Chosen Encryption
Algorithm IE, which may be included in the following messages:

  - 3.2.1.2   ASSIGNMENT COMPLETE
  - 3.2.1.8   HANDOVER REQUEST
  - 3.2.1.10  HANDOVER REQUEST ACKNOWLEDGE
  - 3.2.1.12  HANDOVER COMPLETE
  - 3.2.1.25  HANDOVER PERFORMED
  - 3.2.1.31  CIPHER MODE COMPLETE

is coded as follows:

  0000 0001   No encryption used
  0000 0010   GSM A5/1
  0000 0011   GSM A5/2
  0000 0100   GSM A5/3
  0000 0101   GSM A5/4
  0000 0110   GSM A5/5
  0000 0111   GSM A5/6
  0000 1000   GSM A5/7

basically A5/X => X + 1.  All other values are Reserved for future
international use.  As can be seen, value 0x00 is RFU.  Passing
this value to some encoding functions would result in a PDU with
this IE omitted.  Although, some functions would still encode
Chosen Encryption Algorithm IE with this RFU value.

Let's ensure that all functions behave consistently.

Change-Id: If10e433a8174eabe6aa6d2c2937bf9cf5d14d7c9
2020-09-18 08:41:57 +00:00
..
milenage
Makefile.am Bump version: 1.3.0.173-51974 → 1.4.0 2020-08-13 11:06:36 +02:00
a5.c
abis_nm.c gsm 12.21: add osmocom specific NM_ATT_OSMO_NS_LINK_CFG 2020-08-06 16:41:20 +00:00
apn.c make all library-internal static buffers thread-local 2019-06-04 10:47:30 +02:00
auth_comp128v1.c
auth_comp128v23.c
auth_core.c Use define for key buffers 2018-12-20 09:51:02 +00:00
auth_milenage.c
auth_xor.c libosmogsm: add support for XOR authentication 2019-11-22 17:39:42 +00:00
bts_features.c bts_features: add feature BTS_FEAT_IPV6_NSVC 2020-07-28 13:58:46 +02:00
cbsp.c comment: mention spec reference in cbsp.[ch] 2020-08-25 13:34:04 +02:00
comp128.c
comp128v23.c
gan.c
gea.c
gprs_cipher_core.c
gprs_gea.c
gprs_rlc.c
gsm48.c api comment: fix example of osmo_mobile_identity_encode_msgb 2020-06-24 11:31:56 +00:00
gsm48_arfcn_range_encode.c port arfcn range encode support from osmo-bsc 2019-01-12 09:51:05 +00:00
gsm48_ie.c gsm48_decode_bcd_number2: fix ENOSPC edge case 2019-06-07 11:01:51 +02:00
gsm48_rest_octets.c rest_octets: fix encoding of 3G Early Classmark Sending Restriction 2020-05-05 02:03:51 +07:00
gsm0341.c
gsm0411_smc.c gsm0411_{smc,smr}.c: Work around newlib bug 2020-07-30 21:35:10 +02:00
gsm0411_smr.c gsm0411_{smc,smr}.c: Work around newlib bug 2020-07-30 21:35:10 +02:00
gsm0411_utils.c libosmogsm: (re)introduce gsm48_push_l3hdr() 2018-08-05 23:21:43 +07:00
gsm0414.c
gsm0480.c 04.80: Deprecate gsm0480_create_ussd_resp() 2019-11-30 12:39:39 +00:00
gsm0502.c libosmogsm: add Doxygen docs for gsm0502_hop_seq_gen() 2020-05-15 17:56:41 +00:00
gsm0808.c gsm0808: fix: do not encode invalid encryption algorithm 2020-09-18 08:41:57 +00:00
gsm0808_utils.c gsm0808_utils: Add gsm0808_get_cipher_reject_cause() back with a deprecation notice. 2020-05-14 09:02:39 +00:00
gsm23003.c fix isdigit taking unsigned as input 2019-06-13 13:49:30 +00:00
gsm23236.c add gsm23236: MSC pooling: TMSI and NRI utility functions 2020-06-10 14:20:49 +02:00
gsm29118.c Revert "add osmo_mobile_identity API" 2020-06-16 09:21:08 +02:00
gsm29205.c LCLS: add string dump helpers 2019-02-26 09:16:38 +00:00
gsm48049.c gsm/gsm48049.c: fix use of GNU 'missing =' extension in designator 2020-01-21 18:34:04 +07:00
gsm_04_08_gprs.c
gsm_utils.c gsm: gsm_utils: Fix return type of API ms_class_gmsk_dbm() and add unit tests 2019-11-04 12:41:22 +01:00
gsup.c gsup: Introduce OSMO_GSUP_NUM_VECTORS_REQ_IE 2019-12-09 10:54:30 +00:00
gsup_sms.c GSUP/SMS: introduce MO-/MT-FORWARD-SM messages 2018-12-18 21:52:01 +07:00
i460_mux.c i460: Fix bit- and subslots ordering of I.460 mux + demux 2020-08-02 21:57:05 +02:00
ipa.c ipa: Fix wrong output log formatting 2020-08-27 10:45:30 +00:00
kasumi.c
lapd_core.c lapd_core: After calling into L3, check if the state has changed 2020-07-04 10:52:13 +02:00
lapdm.c lapdm: fix SAPI-0/SAPI-3 frame prioritization on DCCH 2020-08-27 22:10:54 +07:00
libosmogsm.map gsm0808: add gsm0808_create_sapi_reject_cause() 2020-08-26 18:30:19 +07:00
mncc.c
oap.c
oap_client.c oap_client: Fix license: GPLv2+ instead of AGPLv3+ 2019-05-27 23:26:45 +02:00
rsl.c gsm_08_58: add missing RSL error cause codes 2020-07-31 21:23:49 +00:00
rxlev_stat.c
sysinfo.c
tlv_parser.c TLV: Add one-shot TLV encoder 2019-05-19 07:33:32 +00:00