83Plus:BCALLs:809F
From WikiTI
Revision as of 17:35, 25 December 2005 by FloppusMaximus (Talk | contribs)
Synopsis
Official Name: SetupAppPubKey
Other Name: GetFreewareKey
BCALL Address: 809F
Loads an application public key as a big integer into the appData area.
Inputs
- A = base page of the application to be validated (must be in Flash)
Outputs
- Memory at 8000 contains the corresponding key
Destroys
- BC, DE
Comments
The large integer loaded to 8000h is the 512 bit modulus used for decrypting Rabin signatures in Apps. The first byte of the integer is the length of the large integer followed by the integer in little endian.
This routine will always work if a freeware key (0104, or 010A on the TI-84 Plus) is requested. Loading non-freeware keys requires Flash to be write-enabled first. (If Flash is write-disabled and a non-freeware key is requested, the routine will fall back to key 0104, but it is not clear that this is intentional.)
Example
ld a,69h B_CALL SetupAppPubKey