head 1.1; branch 1.1.1; access; symbols netbsd-11-0-RC7:1.1.1.2 netbsd-11-0-RC6:1.1.1.2 netbsd-11-0-RC5:1.1.1.2 FILE5_48:1.1.1.2 netbsd-11-0-RC4:1.1.1.2 netbsd-11-0-RC3:1.1.1.2 netbsd-11-0-RC2:1.1.1.2 netbsd-11-0-RC1:1.1.1.2 perseant-exfatfs-base-20250801:1.1.1.2 netbsd-11:1.1.1.2.0.4 netbsd-11-base:1.1.1.2 netbsd-10-1-RELEASE:1.1.1.1 perseant-exfatfs-base-20240630:1.1.1.2 perseant-exfatfs:1.1.1.2.0.2 perseant-exfatfs-base:1.1.1.2 netbsd-10-0-RELEASE:1.1.1.1 netbsd-10-0-RC6:1.1.1.1 netbsd-10-0-RC5:1.1.1.1 netbsd-10-0-RC4:1.1.1.1 netbsd-10-0-RC3:1.1.1.1 netbsd-10-0-RC2:1.1.1.1 netbsd-10-0-RC1:1.1.1.1 FILE5_45:1.1.1.2 netbsd-10:1.1.1.1.0.6 netbsd-10-base:1.1.1.1 FILE5_43:1.1.1.1 cjep_sun2x-base1:1.1.1.1 cjep_sun2x:1.1.1.1.0.4 cjep_sun2x-base:1.1.1.1 cjep_staticlib_x-base1:1.1.1.1 cjep_staticlib_x:1.1.1.1.0.2 cjep_staticlib_x-base:1.1.1.1 FILE5_40:1.1.1.1 CHRISTOS:1.1.1; locks; strict; comment @# @; 1.1 date 2021.04.09.18.58.01; author christos; state Exp; branches 1.1.1.1; next ; commitid W9ddLLbSkHHinEOC; 1.1.1.1 date 2021.04.09.18.58.01; author christos; state Exp; branches; next 1.1.1.2; commitid W9ddLLbSkHHinEOC; 1.1.1.2 date 2023.08.18.18.36.50; author christos; state Exp; branches; next ; commitid IX26ghc1E2S0AiBE; desc @@ 1.1 log @Initial revision @ text @ #------------------------------------------------------------------------------ # $File: crypto,v 1.2 2021/03/27 20:15:53 christos Exp $ # crypto: file(1) magic for crypto formats # @ 1.1.1.1 log @2021-03-30 20:21 Christos Zoulas * release 5.40 2021-02-05 16:31 Christos Zoulas * PR/234: Add limit to the number of bytes to scan for encoding * PR/230: Fix /T (trim flag) for regex 2021-02-01 12:31 Christos Zoulas * PR/77: Trim trailing separator. 2020-12-17 15:44 Christos Zoulas * PR/211: Convert system read errors from corrupt ELF files into human readable error messages 2020-12-08 16:24 Christos Zoulas * fix multithreaded decompression file descriptor issue by using close-on-exec (Denys Vlasenko) 2020-06-27 11:58 Christos Zoulas * Exclude surrogate pairs from utf-8 detection (Michael Liu) 2020-06-25 12:53 Christos Zoulas * Include # to the list of ignored format chars (Werner Fink) @ text @@ 1.1.1.2 log @Update to file-5.45 (Last was file-5.44) 2023-07-27 15:45 Christos Zoulas * release 5.45 2023-07-17 11:53 Christos Zoulas * PR/465: psrok1: Avoid muslc asctime_r crash 2023-05-21 13:05 Christos Zoulas * add SIMH tape format support 2023-02-09 12:50 Christos Zoulas * bump the max size of the elf section notes to be read to 128K and make it configurable 2023-01-08 1:08 Christos Zoulas * PR/415: Fix decompression with program returning empty 2022-12-26 1:47 Christos Zoulas * PR/408: fix -p with seccomp * PR/412: fix MinGW compilation @ text @d3 1 a3 1 # $File: crypto,v 1.4 2023/07/17 16:41:48 christos Exp $ a5 44 # Bitcoin block files 0 lelong 0xD9B4BEF9 Bitcoin >(4.l+40) lelong 0xD9B4BEF9 reverse block >>4 lelong x \b, size %u # normal block below >0 default x block >>4 lelong x \b, size %u >>8 lelong&0xE0000000 0x20000000 >>>8 lelong x \b, BIP9 0x%x >>8 lelong&0xE0000000 !0x20000000 >>>8 lelong x \b, version 0x%x >>76 ledate x \b, %s UTC # VarInt counter >>88 ubyte <0xfd \b, txcount %u >>88 ubyte 0xfd >>>89 leshort x \b, txcount %u >>88 ubyte 0xfe >>>89 lelong x \b, txcount %u >>88 ubyte 0xff >>>89 lequad x \b, txcount %llu !:ext dat # option to find more blocks in the file #>>(4.l+8) indirect x ; # LevelDB -8 lequad 0xdb4775248b80fb57 LevelDB table data # http://www.tarsnap.com/scrypt.html # see scryptenc_setup() in lib/scryptenc/scryptenc.c 0 string scrypt\0 scrypt encrypted file >7 byte x \b, N=2**%d >8 belong x \b, r=%d >12 belong x \b, p=%d # https://age-encryption.org/ # Only the first recipient is printed in detail to prevent repetitive output # in extreme cases ("ssh-rsa, ssh-rsa, ssh-rsa, ..."). 0 string age-encryption.org/v1\n age encrypted file >25 regex/128 \^[^\040]+ \b, %s recipient >>25 string scrypt >>>&0 regex/64 [0-9]+\$ (N=2**%s) >>&0 search/256 \n->\040 \b, among others 0 string -----BEGIN\040AGE\040ENCRYPTED\040FILE----- age encrypted file, ASCII armored @