Difference between revisions of "83Plus:BCALLs:809F"
From WikiTI
(more details (ha! and you thought we were done with all this silly crypto stuff!)) |
|||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | [[Category:83Plus:BCALLs:By Name:Math| | + | [[Category:83Plus:BCALLs:By Name:Cryptography|SetupAppPubKey]] [[Category:83Plus:BCALLs:By Name:Math:Big Integer|SetupAppPubKey]] [[Category:83Plus:BCALLs:By Name:Math|SetupAppPubKey]] [[Category:83Plus:BCALLs:By Name|SetupAppPubKey]] [[Category:83Plus:BCALLs:By Address|809F - SetupAppPubKey]] |
− | [[Category:83Plus:BCALLs:By Name| | + | |
− | [[Category:83Plus:BCALLs:By Address|809F - | + | |
== Synopsis == | == Synopsis == | ||
− | '''Official Name:''' GetFreewareKey | + | '''Official Name:''' SetupAppPubKey |
+ | |||
+ | '''Other Name:''' GetFreewareKey | ||
'''BCALL Address:''' 809F | '''BCALL Address:''' 809F | ||
− | Loads | + | Loads an application public key as a [[83Plus:OS:Big Integers|big integer]] into the [[83Plus:RAM:8000|appData]] area. |
=== Inputs === | === Inputs === | ||
− | * | + | * A = base page of the application to be validated (must be in Flash) |
− | + | ||
=== Outputs === | === Outputs === | ||
− | * Memory at | + | * Memory at [[83Plus:RAM:8000|8000]] contains the corresponding key |
=== Destroys === | === Destroys === | ||
− | * | + | * BC, DE |
== Comments == | == 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. | 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 [[83Plus:Ports:14|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 == | == Example == | ||
− | B_CALL | + | ld a,69h |
+ | B_CALL SetupAppPubKey |
Latest revision as of 17:35, 25 December 2005
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