You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why is BouncyCastle so big? (is inflated 😄) Currently, the DLL has over 8 GB and the entire Nuget 14.2 MB.
Background
Currently, SSH.NET uses source code copied from BouncyCastle. We are considering using the official Nuget of this library which has many benefits for SSH.NET. More details sshnet/SSH.NET#1271
However, the size of the BouncyCastle DLL is out of proportion to SSH.NET
The problem was mainly because of PQC code, some of which has been removed (and more will go), some shrunk. What's left should be better trimmable now if that's helpful. I am hoping to split the current mono-package up, perhaps for a 3.0 version, but it is a significant change.
Activity
harrison314 commentedon Dec 16, 2023
A large part of BouncyCastle's volume is occupied by data for post-quantum cryptography. Then some data for elliptic curves.
jstedfast commentedon Feb 2, 2024
At one point, the BouncyCastle.Crypto.dll (before the migration to dotnet core), it also seemed to contain Unit Test data. Is that still the case?
harrison314 commentedon Feb 3, 2024
Not, test data is in separate folder https://github.com/bcgit/bc-csharp/tree/master/crypto/test/data and is not included in BouncyCastle.Crypto https://github.com/bcgit/bc-csharp/blob/master/crypto/src/BouncyCastle.Crypto.csproj#L85
peterdettman commentedon Sep 3, 2026
The problem was mainly because of PQC code, some of which has been removed (and more will go), some shrunk. What's left should be better trimmable now if that's helpful. I am hoping to split the current mono-package up, perhaps for a 3.0 version, but it is a significant change.