Skip to content

Check sha1#13

Merged
rudolfochrist merged 4 commits intorudolfochrist:masterfrom
bo-tato:check-sha1
Feb 15, 2024
Merged

Check sha1#13
rudolfochrist merged 4 commits intorudolfochrist:masterfrom
bo-tato:check-sha1

Conversation

@bo-tato
Copy link
Collaborator

@bo-tato bo-tato commented Feb 13, 2024

After exchange on reddit when ql-https release was posted there, I realize the sha1 provided doesn't come from git as I had thought for some reason, but is calculated by iterating over the files in the tgz sorted by filename and feeding each into the sha1 digest. This is done by quicklisp-controller using sha1 from ironclad, but as we are quicklisp client and not server side script, we shouldn't use dependencies so I took the code from quicklisp-controller and used openssl dgst -sha1 instead of using ironclad. sha1 is much more expensive to generate collisions for than md5, so this should provide a meaningful increase in security in case quicklisp server is compromised, though it is still possible to generate collisions. It'd be great if quicklisp dist provided a secure hash like sha256 but I think this is the best we can check for now

Copy link
Owner

@rudolfochrist rudolfochrist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine. Thank you

@@ -0,0 +1,135 @@
;; copied from tarhash.lisp from quicklisp-controller: https://github.com/quicklisp/quicklisp-controller
;; changed to use openssl to compute sha1 digest rather than depending on ironclad

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add the license information here as a comment as well?

https://github.com/quicklisp/quicklisp-controller/blob/master/LICENSE

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call, added

@rudolfochrist rudolfochrist merged commit ec7a164 into rudolfochrist:master Feb 15, 2024
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

Successfully merging this pull request may close these issues.

2 participants