kormax / apple-vas Goto Github PK
View Code? Open in Web Editor NEWReverse-engineering Apple VAS protocol
Reverse-engineering Apple VAS protocol
Hello,
i'm trying to follow this very useful guide to read and decrypt data from NFC Test Passes.
I'll generate my keys and have my passes in future, but for now I can only work on this public passes.
I have the private and public compressed keys, and i'm at the point of decrypting the payload but from the python example, some items are not clear to me:
`
PUBLIC_KEY_ASN_HEADER = bytearray.fromhex(
"3039301306072a8648ce3d020106082a8648ce3d030107032200"
)
def generate_shared_info(pass_identifier: str):
"""
:param pass_identifier: pass identifier
:return: shared info used in X963 KDF when decrypting pass data
"""
return bytes([
*"ASN 1 RELATIVE-OID".encode("ascii"),
*"REDACTED REDACTED REDACTED".encode("ascii"),
*hashlib.sha256(pass_identifier.encode("ascii")).digest()
])
`
I'm quite comfortable with the rest of the code, i'm developing in java but it's quite easy, but I can't figure these three elements.
Can you please help me?
Even in private, any help would be welcome!
Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.