tlsnotary/PageSigner

Validating and exploring content of .pgsg in C, C++ or Rust

Jonas-Metzger opened this issue · 5 comments

Hi!

I'd like to validate a .pgsg in C, C++ or Rust. It's fine if some preprocessing is required in another language (like java script), as long as the C/C++/Rust code can convince itself of the validity of the website data, and subsequently perform computations on that data.

Am I correct that this should be possible? If so, what may be the easiest way to go about implementing this? Thanks a lot!

Hi, @Jonas-Metzger , yes that is possible, you just have to port this function verifyPgsgV4 into your language

https://github.com/tlsnotary/pagesigner/blob/75fa750e03caba4a65f96a39d31676d4333423ea/webextension/content/main.js#L669

Thanks so much for the pointer @themighty1 ! I was hoping for something exactly like this.

Sorry if it's a dumb question, but: if .pgsg is in .json format, how come so much of it is unreadable if I open it in notepad++?

@Jonas-Metzger , you'll have to rename .pgsg into .json and then open it.

Thanks! Found the issue: Turns out notepad can open a .pgsg I create myself, but it doesn't handle the two example files well that you provide on your website. Good enough!

Thanks for the heads-up about old pgsg files. They are now taken down.