View Issue Details

IDProjectCategoryView StatusLast Update
0000145fileGeneralpublic2020-03-20 16:16
Reporterhlein Assigned Tochristos  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformamd64OSLinux 
Product Version5.38 
Fixed in Version5.39 
Summary0000145: Incorrect labels for PGP keys of 4096 and 8192 bytes
Descriptionmagic/Magdir/pgp contains rules for PGP files and prints the key size and keyid such as:

# 1024b RSA encrypted data
0 string \x84\x8c\x03 PGP RSA encrypted session key -
...
>11 byte 0x01 RSA (Encrypt or Sign) 1024b
>11 byte 0x02 RSA Encrypt-Only 1024b

Several entries have typoes in either the comment, or the output string, or both.
Additional InformationI'll attach a patch to fix these. Note that this diff is on top of the one I submitted for https://bugs.astron.com/view.php?id=144
Tagsmagic

Activities

hlein

2020-02-22 01:38

reporter  

file-magic-pgp-keysizes.diff (788 bytes)   
--- magic/Magdir/pgp.orig	2020-02-21 18:26:43.526378352 -0500
+++ magic/Magdir/pgp	2020-02-21 18:38:58.661288076 -0500
@@ -175,7 +175,7 @@
 >13	string	\x0b\xf9
 >399	byte	0xd2			.
 
-# 3072b RSA encrypted data
+# 4096b RSA encrypted data
 
 0	string	\x85\x02\x0c\x03	PGP RSA encrypted session key -
 >4	belong	x			keyid: %08X
@@ -192,13 +192,13 @@
 >13	string	\x0f\xf9
 >527	byte	0xd2			.
 
-# 4096b RSA encrypted data
+# 8192b RSA encrypted data
 
 0	string	\x85\x04\x0c\x03	PGP RSA encrypted session key -
 >4	belong	x			keyid: %08X
 >8	belong	x			%08X
->12	byte	0x01			RSA (Encrypt or Sign) 8129b
->12	byte	0x02			RSA Encrypt-Only 8129b
+>12	byte	0x01			RSA (Encrypt or Sign) 8192b
+>12	byte	0x02			RSA Encrypt-Only 8192b
 >13	string	\x20\x00
 >13	string	\x1f\xff
 >13	string	\x1f\xfe

christos

2020-03-20 16:16

manager   ~0003396

Patch applied, thanks!

Issue History

Date Modified Username Field Change
2020-02-22 01:38 hlein New Issue
2020-02-22 01:38 hlein File Added: file-magic-pgp-keysizes.diff
2020-02-22 01:38 hlein Tag Attached: magic
2020-03-20 16:15 christos Assigned To => christos
2020-03-20 16:15 christos Status new => assigned
2020-03-20 16:16 christos Status assigned => resolved
2020-03-20 16:16 christos Resolution open => fixed
2020-03-20 16:16 christos Fixed in Version => 5.39
2020-03-20 16:16 christos Note Added: 0003396