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

Include C++ implementations of BoringSSL algorithms #300

Closed
3 tasks done
fpseverino opened this issue Nov 23, 2024 · 6 comments · Fixed by #303
Closed
3 tasks done

Include C++ implementations of BoringSSL algorithms #300

fpseverino opened this issue Nov 23, 2024 · 6 comments · Fixed by #303

Comments

@fpseverino
Copy link
Contributor

fpseverino commented Nov 23, 2024

In BoringSSL some algorithms, like ML-KEM and ML-DSA, are written in C++, but the vendor-boringssl.sh script doesn't look for .cc files inside BoringSSL’s crypto directory.

New Issue Checklist

Expected behavior

Being able to use methods from algorithms written in C++

Actual behavior

Not being able to use methods from algorithms written in C++

Steps to reproduce

  1. Add the header file of an algorithm written in C++ inside Sources/CCryptoBoringSSL/include/CCryptoBoringSSL.h
  2. Import CCryptoBoringSSL
  3. Try to use a CCryptoBoringSSL_xxx method of an algorithm written in C++

Swift Crypto version/commit hash

commit: ff0f781

Environment

Swift version: Apple Swift version 6.0.2 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)
Target: arm64-apple-macosx15.0
Unix version: Darwin MacBookPro.wind3.hub 24.1.0 Darwin Kernel Version 24.1.0: Thu Oct 10 21:05:14 PDT 2024
 root:xnu-11215.41.3~2/RELEASE_ARM64_T8103 arm64

macOS version: 15.1.1
Xcode-select path: '/Applications/Xcode.app/Contents/Developer
Xcode: Xcode 16.1 (Build version 16B40)

@Lukasa
Copy link
Contributor

Lukasa commented Nov 26, 2024

Thanks for filing this @fpseverino! Let's nail this down before we move forward on #278 and #267, as I'd like us to make sure we aren't going to regress those.

@fpseverino
Copy link
Contributor Author

fpseverino commented Nov 26, 2024

I agree @Lukasa! This will need a BoringSSL update too, right? Is it something that I can/should do?

@Lukasa
Copy link
Contributor

Lukasa commented Nov 26, 2024

It's going to be a lot easier for me to do it than you, I suspect

@fpseverino
Copy link
Contributor Author

All right, just to clarify, would you also take care of updating the script or would you prefer me to do it?

@Lukasa
Copy link
Contributor

Lukasa commented Nov 26, 2024

I can update the script as well. 😄

@Lukasa
Copy link
Contributor

Lukasa commented Nov 27, 2024

Huh, turns out that we timed this work well, as that immediately became 100% necessary! https://boringssl.googlesource.com/boringssl/+/5813c2c10c73d800f1b0d890a7d74ff973abbffc

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 a pull request may close this issue.

2 participants