US Patent No. 10,248,795

IMPLEMENTING METHOD FOR JAVACARD APPLICATION FUNCTION EXPANSION


Patent No. 10,248,795
Issue Date April 02, 2019
Title Implementing Method For Javacard Application Function Expansion
Inventorship Zhou Lu, Beijing (CN)
Huazhang Yu, Beijing (CN)
Assignee Feitian Technologies Co., Ltd., Beijing (CN)

Claim of US Patent No. 10,248,795

1. An implementing method for JavaCard application function expansion, comprising a registering process and an invoking process on a JavaCard, an expansion application and a master application on the JavaCard starting working after being activated, wherein the registering process comprises:Step S1, obtaining, by the expansion application, a random number generated by the master application when the expansion application receives a registration command dispatched by runtime environment on the JavaCard;
Step S2, processing, by the expansion application, the random number and sending a processing result, and an expansion application identification and an expansion interface number in the registration command to the master application;
Step S3, verifying, by the master application, the received processing result based upon the generated random number, wherein if verification of the processing result is successful, executing Step S4, otherwise, reporting error and ending the registering process;
Step S4, determining, by the master application, whether a expansion application corresponding to expansion application identification is installed based upon the received expansion application identification, wherein if the master application determines that the expansion application corresponding to expansion application identification is installed, executing Step S5, otherwise, reporting error and ending the registering process;
Step S5, setting, by the master application, a bit of an expansion point corresponding to the expansion interface number in a buffer of the master application; obtaining and storing, by the master application, a handle of the expansion application and returning information of successful association to the expansion application;
Step S6, registering, by the expansion application, a state of its expansion interface and storing the state of the expansion interface in the buffer of the master application;
the invoking process comprises:
Step S7, starting, by the master application, running of an original program when the master application receives a function command dispatched by the runtime environment;
Step S8, determining, by the master application, whether the bit of the expansion point in the buffer is set, if yes, executing Step S9, otherwise, keeping on executing the original program, and going back to Step S8;
Step S9, determining, by the master application, whether the expansion interface corresponding to the expansion interface number is available based upon the state of the expansion interface corresponding to the expansion interface number which corresponds to the expansion point in the buffer, if yes, executing Step S10; otherwise, keeping on executing the original program, and going back to Step S8;
Step S10, invoking, by the master application, the expansion application based upon the stored handle of the expansion application; invoking, by the expansion application, the expansion interface corresponding to the expansion interface number;
Step S11, determining, by the master application, whether to keep on executing the original program, based upon a returned result obtained by invoking the expansion interface corresponding to the expansion interface number by the expansion application, if yes, keeping on executing the original program and going back to Step S8, otherwise, returning executing result and information back to the runtime environment, and ending the invoking process.