Platforms to show: All Mac Windows Linux Cross-Platform

ECKeyMBS.Constructor
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 15.4 Yes Yes Yes Yes All
Function: The constructor.

Feedback, Comments & Corrections

ECKeyMBS.Copy as ECKeyMBS
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 15.4 Yes Yes Yes Yes All
Function: Creates a copy of the key.

Feedback, Comments & Corrections

ECKeyMBS.Generate as Boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 20.2 Yes Yes Yes Yes All
Function: Generates new key and stores in the current object.
Notes: Returns true on success or false on failure.

Feedback, Comments & Corrections

ECKeyMBS.GetPrivateKey(Hex as Boolean) as String
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 20.2 Yes Yes Yes Yes All
Function: Queries private key.
Example:
// make a key
Const NID_secp192k1 = 711
Dim e As ECKeyMBS = ECKeyMBS.KeyByCurveName(NID_secp192k1)

// show private key
MsgBox e.GetPrivateKey(True)+_
EndOfLine+_
e.GetPrivateKey(False)
Notes: The private key is a big number, which can be returned as decimal or hexadecimal value.

Feedback, Comments & Corrections

ECKeyMBS.GetPublicKey(byref x as String, byref y as String, Hex as Boolean) as Boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 20.2 Yes Yes Yes Yes All
Function: Queries X and Y of public key.
Example:
// make a key
Const NID_secp192k1 = 711
Dim e As ECKeyMBS = ECKeyMBS.KeyByCurveName(NID_secp192k1)

// show public key
dim x,y as string
If e.GetPublicKey(x, y, False) Then
MsgBox x+EndOfLine+y
End If
Notes:
The public key is made up with two big numbers, which can be returned as decimal or hexadecimal value.
Returns true on success or false on failure.

Feedback, Comments & Corrections

ECKeyMBS.GetPublicKeyPoint as String
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 20.2 Yes Yes Yes Yes All
Function: Queries Public key as hex string.
Example:
// make a key
Const NID_secp192k1 = 711
Dim e As ECKeyMBS = ECKeyMBS.KeyByCurveName(NID_secp192k1)

// show public key
msgbox e.GetPublicKeyPoint
Notes: Can be queried to save/send and later be assigned with SetPublicKeyPoint.

Feedback, Comments & Corrections

ECKeyMBS.PrivateKey as String
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 15.4 Yes Yes Yes Yes All
Function: Queries the private key.
Example:
const NID_secp192k1 = 711
dim key as ECKeyMBS = ECKeyMBS.KeyByCurveName(NID_secp192k1)
dim Data as string = key.PrivateKey
MsgBox EncodeBase64(data)

Feedback, Comments & Corrections

ECKeyMBS.PublicKey as String
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 15.4 Yes Yes Yes Yes All
Function: Queries the public key.
Example:
const NID_secp192k1 = 711
dim key as ECKeyMBS = ECKeyMBS.KeyByCurveName(NID_secp192k1)
dim Data as string = key.PublicKey
MsgBox EncodeBase64(data)

Feedback, Comments & Corrections

ECKeyMBS.SetPrivateKey(Value as String, Hex as Boolean) as Boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 20.2 Yes Yes Yes Yes All
Function: Sets private key.
Example:
// make a key
Const NID_secp192k1 = 711
Dim e As ECKeyMBS = ECKeyMBS.KeyByCurveName(NID_secp192k1)

MsgBox e.Description

// get hex
Dim pubk As String = e.GetPublicKeyPoint
Dim priv As String = e.GetPrivateKey(False)


// make new empty key and put in the data
Dim ee As ECKeyMBS = ECKeyMBS.KeyByCurveName(NID_secp192k1, False)

If ee.SetPrivateKey(priv, False) Then
If ee.SetPublicKeyPoint(pubk) Then
MsgBox ee.Description
Else
Break // failed?
End If
Else
Break // failed?
End If
Notes: Returns true on success or false on failure.

Feedback, Comments & Corrections

ECKeyMBS.SetPublicKey(x as String, y as String, Hex as Boolean) as Boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 20.2 Yes Yes Yes Yes All
Function: Sets X and Y of public key.
Example:
// make a key
Const NID_secp192k1 = 711
Dim e As ECKeyMBS = ECKeyMBS.KeyByCurveName(NID_secp192k1)

MsgBox e.Description

// get hex
Dim pubk As String = e.GetPublicKeyPoint
Dim priv As String = e.GetPrivateKey(False)


// make new empty key and put in the data
Dim ee As ECKeyMBS = ECKeyMBS.KeyByCurveName(NID_secp192k1, False)

If ee.SetPrivateKey(priv, False) Then
If ee.SetPublicKeyPoint(pubk) Then
MsgBox ee.Description
Else
Break // failed?
End If
Else
Break // failed?
End If
Notes: Returns true on success or false on failure.

Feedback, Comments & Corrections

ECKeyMBS.SetPublicKeyPoint(Value as String) as Boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 20.2 Yes Yes Yes Yes All
Function: Sets public key.
Notes: Returns true on success or false on failure.

Feedback, Comments & Corrections

ECKeyMBS.Sign(Data as String) as String
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 15.4 Yes Yes Yes Yes All
Function: Signs the given data.
Example:
const NID_secp192k1 = 711
dim key as ECKeyMBS = ECKeyMBS.KeyByCurveName(NID_secp192k1)
dim text as string = "Hello World"
dim data as string = SHA512MBS.Hash(text)
dim sig as string = key.Sign(data)

if key.Verify(data, sig) then
MsgBox "Signature ok"
end if
Notes:
We highly recommend to use a hash like SHA-512 to preprocess the data.
Returns the signature as string on success.

Feedback, Comments & Corrections

ECKeyMBS.Verify(SignatureData as String, Data as String) as Boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Encryption and Hash MBS Encryption Plugin 15.4 Yes Yes Yes Yes All
Function: Verifies the digital signature.
Example:
const NID_secp192k1 = 711
dim key as ECKeyMBS = ECKeyMBS.KeyByCurveName(NID_secp192k1)
dim text as string = "Hello World"
dim data as string = SHA512MBS.Hash(text)
dim sig as string = key.Sign(data)

if key.Verify(data, sig) then
MsgBox "Signature ok"
end if
Notes:
Returns true on success. Returns false if data, signature and public key don't belong together.
We highly recommend to use a hash like SHA-512 to preprocess the data.

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS Encryption Plugin.

The biggest plugin in space...




Links
MBS Xojo Chart Plugins