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

libgcrypt: introduce mini variant #25602

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jschwartzenberg
Copy link

Maintainer: @flyn-org
Compile tested: (mipsel_24kc_musl, TP-Link Archer C50v6, f10ee1e20966bdb86cb61a87338f953de1d86cc6)
Run tested: (mipsel_24kc_musl, TP-Link Archer C50v6, 24.10-rc2, tested a version compiled with the same flags still works with vpnc)

Description:
This allows building a smaller version of libgcrypt which takes up less disk space. This helps conserving space on devices with little flash while still providing a working libgcrypt.

Please let me know what you think of this PR! I intend to do more testing with the version built from this specific Makefile but my earlier tests shows that this works fine. Many thanks in advance for any feedback you might have!

@flyn-org
Copy link
Contributor

I like the concept, but DES, MD5, and SHA1 are all obsolete. What led to your cipher/hash choices?

@jschwartzenberg
Copy link
Author

I looked at what vpnc supports: https://github.com/streambinder/vpnc/blob/master/docs/about.md
I avoided anything that it doesn't support. I also had to add blake2 to avoid a build issue.

Possibly this is indeed a very specific set for my situation :)

Maybe it would be possible to experiment with different selections and observe the resulting sizes. I'm not really sure what would be the best approach.

@BKPepe
Copy link
Member

BKPepe commented Dec 23, 2024

This allows building a smaller version of libgcrypt which takes up less disk space.

May I know if you do have some numbers, so we can know how much is less? :) Thank you.

@jschwartzenberg
Copy link
Author

This allows building a smaller version of libgcrypt which takes up less disk space.

May I know if you do have some numbers, so we can know how much is less? :) Thank you.

You might laugh, but here are the differences :)

800K ./build_dir/target-mipsel_24kc_musl/libgcrypt-1.10.3/ipkg-mipsel_24kc/libgcrypt/usr/lib/libgcrypt.so.20.4.3
584K ./build_dir/target-mipsel_24kc_musl/libgcrypt-mini/libgcrypt-1.10.3/.pkgdir/libgcrypt-mini/usr/lib/libgcrypt.so.20.4.3

On routers with tiny flash memory, this difference is enough to enable a few more small packages to be installed alongside :) :)

Signed-off-by: Julius Schwartzenberg <julius.schwartzenberg@eclipso.eu>
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.

3 participants