Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract R and S values for ASN1 signature? #4

Closed
yspreen opened this issue May 7, 2021 · 2 comments
Closed

Extract R and S values for ASN1 signature? #4

yspreen opened this issue May 7, 2021 · 2 comments

Comments

@yspreen
Copy link

yspreen commented May 7, 2021

I'm trying to extract the R and S values (as Data) from a Data stream. Is that possible with this project? Thanks

@tikhop
Copy link
Owner

tikhop commented May 17, 2021

Hi @yspreen, I'm sorry for the late response. I have been off the grid for the last 3 weeks.

I believe we can extract any data we want from any asn1 data stream. Unfortunately, I haven't tried to parse anything, but Apple in-app receipt which is just a pcks7 file, but I don't see any problems to do so. If we know the asn1 structure
of incoming data, then we can declare a struct and decode asn1 data into this struct.

Do you have a base64 string of data you want to parse?

@yspreen
Copy link
Author

yspreen commented May 17, 2021

I envy your off-the-grid-ness ;)

So the use-case is quite narrow, and I decided to implement it without the use of a library. It would've been overkill. Here's the code: https://github.com/eu-digital-green-certificates/dgca-app-core-ios/blob/main/Sources/Services/ASN1.swift

@yspreen yspreen closed this as completed May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants