Xilinx / bootgen

bootgen source code
Other
34 stars 42 forks source link

bootgen -generate-keys pem - warnings and invalid keys generated #11

Closed ldts closed 3 years ago

ldts commented 3 years ago
jramirez@trex bootgen_bif (master *$%)$ more bif.keys
the_ROM_image:
{
        [ppkfile] <keys/PPK.pem>
        [pskfile] <keys/PSK.pem>
        [spkfile] <keys/SPK.pem>
        [sskfile] <keys/SSK.pem>
}

./bootgen -image bif.keys -generate_keys pem

****** Xilinx Bootgen v2021.1
  **** Build date : Jul 15 2021-00:18:02
    ** Copyright 1986-2021 Xilinx, Inc. All Rights Reserved.

WARNING: bad character! '<' (0x3C)
WARNING: bad character! '>' (0x3E)
WARNING: bad character! '<' (0x3C)
WARNING: bad character! '>' (0x3E)
WARNING: bad character! '<' (0x3C)
WARNING: bad character! '>' (0x3E)
WARNING: bad character! '<' (0x3C)
WARNING: bad character! '>' (0x3E)
[WARNING]: A bootimage cannot be generated on the go, with '-generate_keys'.
           However, the requested keys will be generated.

[INFO]   : Bootimage generated successfully

The generated keys can not be used for authentication as they are not the expected 4096 but 2048

RamyaDarapuneni commented 3 years ago

@ldts , Can you please use the option -arch zynqmp and try generating the same? The key algorithm depends on the architecture. The default arch would be zynq and hence a 2048 key would be generated.

ldts commented 3 years ago

ahhh, ok awesome. yes this works. thanks! not sure if it is obvious for everyone but maybe this information could be added to ./bootgen -help generate_keys ?

ldts commented 3 years ago

I'll close the issue now. thanks again!

RamyaDarapuneni commented 3 years ago

Ideally this is default. But yeah, we will check and include in help. Thank You.