mirror of
https://gitea.tendokyu.moe/beerpsi/x.git
synced 2026-09-22 22:28:05 +03:00
just put the keys out there idrc
This commit is contained in:
@@ -63,12 +63,9 @@ BOOTID = {
|
||||
|
||||
# ---- Keys
|
||||
# The BootID (app/opt/pack header) encryption key and IV.
|
||||
BTKEY = bytes.fromhex("")
|
||||
BTIV = bytes.fromhex("")
|
||||
|
||||
# The HMAC key that ensures the app/opt/pack created is authentic.
|
||||
SIGKEY = bytes.fromhex("")
|
||||
|
||||
BTKEY = bytes.fromhex("09ca5efd30c9aaef3804d0a7e3fa7120")
|
||||
BTIV = bytes.fromhex("b155c22c2e7f0491fa7f0fdc217aff90")
|
||||
SIGKEY = bytes.fromhex("e1bdcb2d5e9ed3b5de234364dfa4d126849edff769fc6c28fba5f43bc482bd7479d676afce8188e1d3a6852f4ebce45cde46bd15e8ee5fe84d197f945a54518f")
|
||||
HEADER_META_PUBKEY = RSA.import_key("""-----BEGIN PUBLIC KEY-----
|
||||
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsRMLnJuczNpfoqPpHQ3o
|
||||
5XNkjKXO6P3ToV/45Az5dNaHVL7uEu9vPI7a2KYFQnNYgD3UUHFahfTcljzLOkcH
|
||||
@@ -140,8 +137,8 @@ BOOTID["block_count"] = ceil(filesize / BOOTID["block_size"]) + 8
|
||||
header_meta = struct.pack("<Q", time.time()) + os.path.abspath(INPUT_FILE).encode("utf-8")
|
||||
header_meta += secrets.token_bytes(BOOTID["block_size"] - len(header_meta))
|
||||
header_meta = PKCS1_OAEP.new(HEADER_META_PUBKEY).encrypt(header_meta)
|
||||
bullshit_crc32 = zlib.crc32(header_meta)
|
||||
block_crc32s = [0, bullshit_crc32, bullshit_crc32, bullshit_crc32, bullshit_crc32, bullshit_crc32, bullshit_crc32, bullshit_crc32]
|
||||
header_meta_crc32 = zlib.crc32(header_meta)
|
||||
block_crc32s = [0, header_meta_crc32, header_meta_crc32, header_meta_crc32, header_meta_crc32, header_meta_crc32, header_meta_crc32, header_meta_crc32]
|
||||
|
||||
with open(INPUT_FILE, "rb") as fin, open(OUTPUT_FILE, "w+b") as fout:
|
||||
# Write the bootID.
|
||||
|
||||
Reference in New Issue
Block a user