Skip to content

Generating a shared secret key returns a hex string with two extra bytes. #619

Closed
@williambran

Description

@williambran

When we generate a sharedKey this way, we have two bytes at the beginning of the hexadecimal string. These two bytes vary between 02 and 03.

02bd31c0f26231b8e03500fa9d7eae20a275be3e89fc492a057714a43370629c38
036d87a58361d64e85fcc032055301413chee336e00c1852192e0e6a074b12383c

What do these two bytes represent, and how can we access them to remove them without having to process the final string?
function using
var sharedKey = privateKey.sharedSecretFromKeyAgreement(with: publickey)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions