JavacardOS will not accept order any more, please contact our partner Feitian online Store:
https://ftsafe.en.alibaba.com/index.html
https://ftsafe.en.alibaba.com/index.html
DES decryption implementation in java and java card
DES decryption implementation in java and java card
Recently, I found a difference between DES decryption implementation in java and java card.
In UPDATE method, DES CBC (M1, M2, or, PK5)
- In java, it need to have at least 16 bytes input to have output data.
- In java card, you should have at least 8 byte to have output data.
Why does this difference there? Could anybody explain it to me? Thanks.
In UPDATE method, DES CBC (M1, M2, or, PK5)
- In java, it need to have at least 16 bytes input to have output data.
- In java card, you should have at least 8 byte to have output data.
Why does this difference there? Could anybody explain it to me? Thanks.
Re: DES decryption implementation in java and java card
mose05 wrote:- In java, it need to have at least 16 bytes input to have output data.
Have you got 8 bytes in the response? If you have 8 bytes only, you should call doFinal().
Re: DES decryption implementation in java and java card
I know that calling doFinal will give me final result.
The problem is that in Java, if input data is less than 16 bytes,there will be no output after calling update .
But in javacard it will give output of update method if the input data is more than 8 bytes length.
Is there any advantage between them?
The problem is that in Java, if input data is less than 16 bytes,there will be no output after calling update .
But in javacard it will give output of update method if the input data is more than 8 bytes length.
Is there any advantage between them?
Re: DES decryption implementation in java and java card
IMO, there is no advantage or dis-advantage in this case. You should not rely on intermediate results of update anyway because the operation is not completed until doFinal(...) method is called.
Who is online
Users browsing this forum: No registered users and 35 guests