From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "identification" |
|---|
| subject | "Library:Mbed TLS" |
|---|
| claim | "The records of ciphersuite_definitions[] date a build without any string: a 48-byte (64-bit) or 40-byte (32-bit) stride means the old layout of 2.x to 3.1.0, a 24- or 16-byte stride the packed layout of 3.2.0 and later; and the mac field of a *-SHA256 suite holds MBEDTLS_MD_SHA256, which is 6 in 2.x, 4 in 3.0-3.4 and 9 from 3.5.0." |
|---|
| scope | | level | "library" |
|---|
| applies_to | "Library:Mbed TLS" |
|---|
| observed_in | | "Godot 4.2.3-rc and an older UnityPlayer.dll (2.28.x): stride 48, mac 6" |
| "Godot 4.5-4.7, OBS Studio 32, Unity 6000.x x64 (3.6.x): stride 24, mac 9" |
| "Unity 6000.6 win32 UnityPlayer.dll: stride 16, mac 9" |
|
|---|
|
|---|
| data | | method | "Find a name string such as TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256, search for its virtual address stored as a pointer; the record starts one pointer size earlier (int id, padded). Read the stride between records and the mac field (byte at +2*ptr+1 in the packed layout, int at +2*ptr+4 in the old one)" |
|---|
| indicator | "record stride and MBEDTLS_MD_SHA256 value" |
|---|
| table | | stride 48/40, mac 6 | "2.x" |
|---|
| stride 48/40, mac 4 | "3.0.0-3.1.0" |
|---|
| stride 24/16, mac 4 | "3.2.0-3.4.1" |
|---|
| stride 24/16, mac 9 | "3.5.0 and later" |
|---|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "struct mbedtls_ssl_ciphersuite_t {int id; const char *name; uint8_t cipher; uint8_t mac; uint8_t key_exchange; uint8_t flags; uint16_t min_tls_version; uint16_t max_tls_version;}" |
|---|
| repo | "https://github.com/Mbed-TLS/mbedtls" |
|---|
| commit | "068ff080b369adfac81509f9b57b2afabaf82dc5" |
|---|
| path | "include/mbedtls/ssl_ciphersuites.h" |
|---|
| lines | "448-459" |
|---|
|
| type | "source" |
|---|
| detail | "MBEDTLS_MD_SHA256=0x09 (3.5.0 and later; v3.4.1 md.h lists NONE, MD5, SHA1, SHA224, SHA256 = 4; v2.28.10 md.h NONE, MD2, MD4, MD5, SHA1, SHA224, SHA256 = 6). Packed struct first at v3.2.0, int fields still at v3.1.0." |
|---|
| repo | "https://github.com/Mbed-TLS/mbedtls" |
|---|
| commit | "068ff080b369adfac81509f9b57b2afabaf82dc5" |
|---|
| path | "include/mbedtls/md.h" |
|---|
| lines | "47-60" |
|---|
|
| type | "byte_pattern" |
|---|
| detail | "Record of 0xCCA8 in a Godot 4.7.1 x64 export: a8 cc 00 00 00 00 00 00 <8-byte name pointer> 4d 09 03 00 03 03 03 03 (cipher 77 = CHACHA20_POLY1305, mac 9, ECDHE_RSA, TLS 1.2 only); in Godot 4.2.3-rc: a8 cc 00 00 00 00 00 00 <ptr> 49 00 00 00 06 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 00 00 00 00." |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Version from ciphersuite records" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T08:11:26.706Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T02:48:17.778Z" |
|---|
| result | "confirmed" |
|---|
| method | "Fetched md.h at v2.28.10, v3.0.0, v3.4.1, v3.5.0 and ssl_ciphersuites.h at v3.1.0, v3.2.0: enum order gives MBEDTLS_MD_SHA256 = 6 (NONE,MD2,MD4,MD5,SHA1,SHA224,SHA256), 4 in 3.0.0-3.4.1 (MD2/MD4 gone), =0x09 in 3.5.0; v3.1.0 struct has int fields (id, name, cipher, mac, key_exchange, four version ints, flags) = 48 bytes on 64-bit, 40 on 32-bit by my own layout count; v3.2.0 has uint8 cipher/mac/kex/flags + two uint16 = 24/16 bytes. Source read only, no binary." |
|---|
|
|
|---|