Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Include ECDsa in the netcore50 S.S.C.Algorithms implementation - #8481

Merged
bartonjs merged 1 commit into
dotnet:masterfrom
bartonjs:uwp_crypto_algorithms_impl
May 12, 2016
Merged

bartonjs merged 1 commit into
dotnet:masterfrom
bartonjs:uwp_crypto_algorithms_impl

Conversation

@bartonjs

Copy link
Copy Markdown
Member

When making the contract changes to add import/export for ECDsa the
netcore50 build got split off to a separate assembly. This assembly was
supposed to match the 4.1 contract (which has ECDsa), but when excluding the
new EC* types it also lost ECDsa.

Since having more types in the implementation than required by the contract
isn't bad, just go ahead and include all the files in the netcore50 build. This
brings ECDsa back, and restores the ability to use ECDsa (directly or indirectly)
in UWP applications.

Fixes #8455.
cc: @ericstj @steveharter

When making the contract changes to add import/export for ECDsa the
netcore50 build got split off to a separate assembly.  This assembly was
supposed to match the 4.1 contract (which has ECDsa), but when excluding the
new EC* types it also lost ECDsa.

Since having more types in the implementation than required by the contract
isn't bad, just go ahead and include all the files in the netcore50 build.  This
brings ECDsa back, and restores the ability to use ECDsa (directly or indirectly)
in UWP applications.
@bartonjs

Copy link
Copy Markdown
Member Author

I added my local build as a package source and referenced that from my UWP CryptRunner sample app; and everything works again (modulo GetECDsaPrivateKey, which we have a bug on).

@steveharter

Copy link
Copy Markdown
Contributor

From a conversation with Eric last week, ECDsa.cs was specifically excluded I thought because it wasn't part of uwp. ?

@bartonjs

Copy link
Copy Markdown
Member Author

I think there was some confusion about UWP not being able to use the new stuff vs UWP not being able to use ECDSA at all. It can use ECDSA (and it works), but it can't use the new stuff because of some validation rules (that might be overly stringent). So netcore50 is locked to the 4.1 version of the contract; but as long as the new stuff doesn't have a runtime dependency that UWP can't meet it's fine to be extra public members as an implementation detail.

Even if it couldn't use ECDSA, we'd still have to have the type defined, because it's in the contract. It should've been a build break, but apparently the ApiCompat tool is out of order.

@steveharter

Copy link
Copy Markdown
Contributor

Assuming that if ECDsa.cs was included without the rest, it would have compile errors. Should we be splitting files out w.r.t. contract? At least to avoid adding in everything\newer stuff? Or is it preferred to add newer stuff to the (older) packages?

@steveharter

Copy link
Copy Markdown
Contributor

Code LGTM

@bartonjs

Copy link
Copy Markdown
Member Author

Until we encounter a change where we have to split the implementation we leave it as unified implementations with split contracts. So two weeks ago there was the 4.0 contract and 4.1 contract, both of which pointed to the one runtime DLL (the 4.1 change was adding ECDsa 😄). Now there's the 4.0, 4.1, and 4.2 contracts, all pointing at the one DLL.

I can't think of anything offhand that would require splitting the implementation across contract versions for a given flavor that wouldn't be a breaking change (like adding a new abstract member to an existing type, or removing a type).

Sure, I say this like it's old hat; but I think I had all the same questions when doing the 4.0/4.1 split :)

@bartonjs
bartonjs merged commit e3a1b44 into dotnet:master May 12, 2016
@bartonjs
bartonjs deleted the uwp_crypto_algorithms_impl branch May 12, 2016 21:57
weshaggard added a commit to weshaggard/corefx that referenced this pull request May 13, 2016
@karelz karelz modified the milestone: 1.0.0-rtm Dec 3, 2016
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…thms_impl

Include ECDsa in the netcore50 S.S.C.Algorithms implementation

Commit migrated from dotnet/corefx@e3a1b44
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants