143a5ec4eSXin LI 243a5ec4eSXin LI#------------------------------------------------------------------------------ 3*898496eeSXin LI# $File: crypto,v 1.4 2023/07/17 16:41:48 christos Exp $ 443a5ec4eSXin LI# crypto: file(1) magic for crypto formats 543a5ec4eSXin LI# 6*898496eeSXin LI# Bitcoin block files 7*898496eeSXin LI0 lelong 0xD9B4BEF9 Bitcoin 8*898496eeSXin LI>(4.l+40) lelong 0xD9B4BEF9 reverse block 9*898496eeSXin LI>>4 lelong x \b, size %u 10*898496eeSXin LI# normal block below 11*898496eeSXin LI>0 default x block 12*898496eeSXin LI>>4 lelong x \b, size %u 13*898496eeSXin LI>>8 lelong&0xE0000000 0x20000000 14*898496eeSXin LI>>>8 lelong x \b, BIP9 0x%x 15*898496eeSXin LI>>8 lelong&0xE0000000 !0x20000000 16*898496eeSXin LI>>>8 lelong x \b, version 0x%x 17*898496eeSXin LI>>76 ledate x \b, %s UTC 18*898496eeSXin LI# VarInt counter 19*898496eeSXin LI>>88 ubyte <0xfd \b, txcount %u 20*898496eeSXin LI>>88 ubyte 0xfd 21*898496eeSXin LI>>>89 leshort x \b, txcount %u 22*898496eeSXin LI>>88 ubyte 0xfe 23*898496eeSXin LI>>>89 lelong x \b, txcount %u 24*898496eeSXin LI>>88 ubyte 0xff 25*898496eeSXin LI>>>89 lequad x \b, txcount %llu 26*898496eeSXin LI!:ext dat 27*898496eeSXin LI# option to find more blocks in the file 28*898496eeSXin LI#>>(4.l+8) indirect x ; 29*898496eeSXin LI 30*898496eeSXin LI# LevelDB 31*898496eeSXin LI-8 lequad 0xdb4775248b80fb57 LevelDB table data 32*898496eeSXin LI 33*898496eeSXin LI# http://www.tarsnap.com/scrypt.html 34*898496eeSXin LI# see scryptenc_setup() in lib/scryptenc/scryptenc.c 35*898496eeSXin LI0 string scrypt\0 scrypt encrypted file 36*898496eeSXin LI>7 byte x \b, N=2**%d 37*898496eeSXin LI>8 belong x \b, r=%d 38*898496eeSXin LI>12 belong x \b, p=%d 39*898496eeSXin LI 40*898496eeSXin LI# https://age-encryption.org/ 41*898496eeSXin LI# Only the first recipient is printed in detail to prevent repetitive output 42*898496eeSXin LI# in extreme cases ("ssh-rsa, ssh-rsa, ssh-rsa, ..."). 43*898496eeSXin LI0 string age-encryption.org/v1\n age encrypted file 44*898496eeSXin LI>25 regex/128 \^[^\040]+ \b, %s recipient 45*898496eeSXin LI>>25 string scrypt 46*898496eeSXin LI>>>&0 regex/64 [0-9]+\$ (N=2**%s) 47*898496eeSXin LI>>&0 search/256 \n->\040 \b, among others 48*898496eeSXin LI 49*898496eeSXin LI0 string -----BEGIN\040AGE\040ENCRYPTED\040FILE----- age encrypted file, ASCII armored 50