title: Whats the architecture behind signed / locked bootloaders (i.e. for android)?
body: <p>i know that for example Motorola used to sign their bootloaders for der Milestone/Droids which made it quiet hard for the modding scene to apply their costum roms.</p>
  
  <p>My question is how does this work on an abstract level?
  I guess it might be like this:</p>
  
  <ol>
  <li>The manufacturer (i.e. Motorola) puts its public key into smartphone's EEPROM/non-volatile memory (NVM)</li>
  <li>The bootloader is signed with the manufacturer's private key</li>
  <li>Upon device start, the bootloader somehow checks it's own signature with the help of the public key, loaded from the eeprom/NVM</li>
  <li>Only, if the signature is correct, the bootloader proceeds.</li>
  </ol>
  
  <p>a) So, if this would be correct, how does step 3 really works? How could a signed application check it's own signature?</p>
  
  <p>b) I guess there is some other piece of code running before the signed bootloader, but isn't the bootloader the first programm to run? (Apart from startup.S)</p>
  
  <p>Hope someone could enlighten me as I only find definition of what signed bootloader means but not how this is really implemented.</p>
  
  <p>Regards</p>