Protecting SLIX2 using TapLinx

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Protecting SLIX2 using TapLinx

78 Views
tomcc
Contributor I

Hi,
I'm having a problem with protecting SLIX2 by a write password from overwriting. Even when I protect the page I am able to overwrite the tag with Android NXP Tag Writer, which makes me think that I didn't protect all the pages correctly.
Here's the code that I am using:

tag.getReader().connect();
randomNumber = tag.getRandomNumber( NFCV_FLAG_DATARATE | NFCV_FLAG_ADDRESS);
xored_password = CustomModules.getUtility().xor(CustomModules.getUtility().append(randomNumber, randomNumber),{0, 0, 0, 0});
tag.setPasswordRead(xored_password, NFCV_FLAG_DATARATE | NFCV_FLAG_ADDRESS);
tag.setPasswordWrite(xored_password, NFCV_FLAG_DATARATE | NFCV_FLAG_ADDRESS);
for (int i=0;i<79;++i) { // based on SLIX2 docs there's 79 blocks, i've also tried to use 2 "pages" but it's not better
  tag.protectPage((byte)i, (byte)0x10, NFCV_FLAG_DATARATE | NFCV_FLAG_ADDRESS);
}
tag.writePasswordWrite(newPassword, NFCV_FLAG_DATARATE | NFCV_FLAG_ADDRESS);

All of the above functions succeed, yet it's possible to break the tag without write password.

Labels (3)
0 Kudos
Reply
0 Replies
%3CLINGO-SUB%20id%3D%22lingo-sub-2246252%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EProtecting%20SLIX2%20using%20TapLinx%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2246252%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3CBR%20%2F%3EI'm%20having%20a%20problem%20with%20protecting%20SLIX2%20by%20a%20write%20password%20from%20overwriting.%20Even%20when%20I%20protect%20the%20page%20I%20am%20able%20to%20overwrite%20the%20tag%20with%20Android%20NXP%20Tag%20Writer%2C%20which%20makes%20me%20think%20that%20I%20didn't%20protect%20all%20the%20pages%20correctly.%3CBR%20%2F%3EHere's%20the%20code%20that%20I%20am%20using%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-java%22%3E%3CCODE%3Etag.getReader().connect()%3B%0ArandomNumber%20%3D%20tag.getRandomNumber(%20NFCV_FLAG_DATARATE%20%7C%20NFCV_FLAG_ADDRESS)%3B%0Axored_password%20%3D%20CustomModules.getUtility().xor(CustomModules.getUtility().append(randomNumber%2C%20randomNumber)%2C%7B0%2C%200%2C%200%2C%200%7D)%3B%0Atag.setPasswordRead(xored_password%2C%20NFCV_FLAG_DATARATE%20%7C%20NFCV_FLAG_ADDRESS)%3B%0Atag.setPasswordWrite(xored_password%2C%20NFCV_FLAG_DATARATE%20%7C%20NFCV_FLAG_ADDRESS)%3B%0Afor%20(int%20i%3D0%3Bi%26lt%3B79%3B%2B%2Bi)%20%7B%20%2F%2F%20based%20on%20SLIX2%20docs%20there's%2079%20blocks%2C%20i've%20also%20tried%20to%20use%202%20%22pages%22%20but%20it's%20not%20better%0A%20%20tag.protectPage((byte)i%2C%20(byte)0x10%2C%20NFCV_FLAG_DATARATE%20%7C%20NFCV_FLAG_ADDRESS)%3B%0A%7D%0Atag.writePasswordWrite(newPassword%2C%20NFCV_FLAG_DATARATE%20%7C%20NFCV_FLAG_ADDRESS)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EAll%20of%20the%20above%20functions%20succeed%2C%20yet%20it's%20possible%20to%20break%20the%20tag%20without%20write%20password.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2246252%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3ECode%20examples%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExample%20code%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EGetting%20Started%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E