Discussion:
ECC Encryption / Decryption
Sanath Prasanna
2021-05-02 11:33:24 UTC
Permalink
Hi,
I want to encrypt a text message using ECC & need to decrypt. Can someone
give me a sample for that process ?
Br,
Robert
Jesper Louis Andersen
2021-05-04 15:17:42 UTC
Permalink
Post by Sanath Prasanna
Hi,
I want to encrypt a text message using ECC & need to decrypt. Can someone
give me a sample for that process ?
You will probably have to give more information.

There are several different types of ECC methods, and inside these, there
are a couple of different elliptic curves you can choose from, and some of
them are standardized requirements for certain applications.

Furthermore, ECC is often used as a tool in a larger toolbox. It's used to
agree on a (shared) secret key for an underlying block or stream cipher,
and in some situations also for agreeing on message authentication (which
protects the message integrity against tampering).
Getting this toolbox / tooling construction wrong can result in the
proposed solution being insecure, so beware.
--
J.
Sanath Prasanna
2021-05-05 02:38:47 UTC
Permalink
Tx Jesper for your kind response. Here attached my sample test file &
following one is not working. That is the expected other Encoding scheme.
(ShaXxxx)
EncryptMsg = public_key:encrypt_private(Msg, ECPublicKey), (line 64)
Can you give some guide to over come this ?
br,
Robert

On Tue, May 4, 2021 at 8:48 PM Jesper Louis Andersen <
Post by Jesper Louis Andersen
Post by Sanath Prasanna
Hi,
I want to encrypt a text message using ECC & need to decrypt. Can someone
give me a sample for that process ?
You will probably have to give more information.
There are several different types of ECC methods, and inside these, there
are a couple of different elliptic curves you can choose from, and some of
them are standardized requirements for certain applications.
Furthermore, ECC is often used as a tool in a larger toolbox. It's used to
agree on a (shared) secret key for an underlying block or stream cipher,
and in some situations also for agreeing on message authentication (which
protects the message integrity against tampering).
Getting this toolbox / tooling construction wrong can result in the
proposed solution being insecure, so beware.
--
J.
Jesper Louis Andersen
2021-05-05 14:09:19 UTC
Permalink
One particular problem is that `public_key:encrypt_private` is the RSA
algorithm, and not ECC. You need `crypto:private_encrypt/4` if you want to
do ECC.
Post by Sanath Prasanna
Tx Jesper for your kind response. Here attached my sample test file &
following one is not working. That is the expected other Encoding scheme.
(ShaXxxx)
EncryptMsg = public_key:encrypt_private(Msg, ECPublicKey), (line 64)
Can you give some guide to over come this ?
br,
Robert
On Tue, May 4, 2021 at 8:48 PM Jesper Louis Andersen <
Post by Jesper Louis Andersen
Post by Sanath Prasanna
Hi,
I want to encrypt a text message using ECC & need to decrypt. Can
someone give me a sample for that process ?
You will probably have to give more information.
There are several different types of ECC methods, and inside these, there
are a couple of different elliptic curves you can choose from, and some of
them are standardized requirements for certain applications.
Furthermore, ECC is often used as a tool in a larger toolbox. It's used
to agree on a (shared) secret key for an underlying block or stream cipher,
and in some situations also for agreeing on message authentication (which
protects the message integrity against tampering).
Getting this toolbox / tooling construction wrong can result in the
proposed solution being insecure, so beware.
--
J.
--
J.
Sanath Prasanna
2021-05-07 03:09:56 UTC
Permalink
Tx Jsesper for your guidance. But still I cannot do that & error came for
below line
EncryptMsg = crypto:private_encrypt(rsa, Msg, ECPrivateKey, rsa_no_padding),
here attached sample file.

On Wed, May 5, 2021 at 7:39 PM Jesper Louis Andersen <
Post by Jesper Louis Andersen
One particular problem is that `public_key:encrypt_private` is the RSA
algorithm, and not ECC. You need `crypto:private_encrypt/4` if you want to
do ECC.
Post by Sanath Prasanna
Tx Jesper for your kind response. Here attached my sample test file &
following one is not working. That is the expected other Encoding scheme.
(ShaXxxx)
EncryptMsg = public_key:encrypt_private(Msg, ECPublicKey), (line 64)
Can you give some guide to over come this ?
br,
Robert
On Tue, May 4, 2021 at 8:48 PM Jesper Louis Andersen <
Post by Jesper Louis Andersen
Post by Sanath Prasanna
Hi,
I want to encrypt a text message using ECC & need to decrypt. Can
someone give me a sample for that process ?
You will probably have to give more information.
There are several different types of ECC methods, and inside these,
there are a couple of different elliptic curves you can choose from, and
some of them are standardized requirements for certain applications.
Furthermore, ECC is often used as a tool in a larger toolbox. It's used
to agree on a (shared) secret key for an underlying block or stream cipher,
and in some situations also for agreeing on message authentication (which
protects the message integrity against tampering).
Getting this toolbox / tooling construction wrong can result in the
proposed solution being insecure, so beware.
--
J.
--
J.
Sanath Prasanna
2021-05-12 11:07:17 UTC
Permalink
Jesper, any comment regarding my problem ?
Br,
Robert
Post by Sanath Prasanna
Tx Jsesper for your guidance. But still I cannot do that & error came for
below line
EncryptMsg = crypto:private_encrypt(rsa, Msg, ECPrivateKey,
rsa_no_padding),
here attached sample file.
On Wed, May 5, 2021 at 7:39 PM Jesper Louis Andersen <
Post by Jesper Louis Andersen
One particular problem is that `public_key:encrypt_private` is the RSA
algorithm, and not ECC. You need `crypto:private_encrypt/4` if you want to
do ECC.
Post by Sanath Prasanna
Tx Jesper for your kind response. Here attached my sample test file &
following one is not working. That is the expected other Encoding scheme.
(ShaXxxx)
EncryptMsg = public_key:encrypt_private(Msg, ECPublicKey), (line 64)
Can you give some guide to over come this ?
br,
Robert
On Tue, May 4, 2021 at 8:48 PM Jesper Louis Andersen <
Post by Jesper Louis Andersen
Post by Sanath Prasanna
Hi,
I want to encrypt a text message using ECC & need to decrypt. Can
someone give me a sample for that process ?
You will probably have to give more information.
There are several different types of ECC methods, and inside these,
there are a couple of different elliptic curves you can choose from, and
some of them are standardized requirements for certain applications.
Furthermore, ECC is often used as a tool in a larger toolbox. It's used
to agree on a (shared) secret key for an underlying block or stream cipher,
and in some situations also for agreeing on message authentication (which
protects the message integrity against tampering).
Getting this toolbox / tooling construction wrong can result in the
proposed solution being insecure, so beware.
--
J.
--
J.
Jesper Louis Andersen
2021-05-12 11:43:20 UTC
Permalink
I'm not your Oracle.
Post by Sanath Prasanna
Jesper, any comment regarding my problem ?
Br,
Robert
Post by Sanath Prasanna
Tx Jsesper for your guidance. But still I cannot do that & error came for
below line
EncryptMsg = crypto:private_encrypt(rsa, Msg, ECPrivateKey,
rsa_no_padding),
here attached sample file.
On Wed, May 5, 2021 at 7:39 PM Jesper Louis Andersen <
Post by Jesper Louis Andersen
One particular problem is that `public_key:encrypt_private` is the RSA
algorithm, and not ECC. You need `crypto:private_encrypt/4` if you want to
do ECC.
Post by Sanath Prasanna
Tx Jesper for your kind response. Here attached my sample test file &
following one is not working. That is the expected other Encoding scheme.
(ShaXxxx)
EncryptMsg = public_key:encrypt_private(Msg, ECPublicKey), (line 64)
Can you give some guide to over come this ?
br,
Robert
On Tue, May 4, 2021 at 8:48 PM Jesper Louis Andersen <
Post by Jesper Louis Andersen
Post by Sanath Prasanna
Hi,
I want to encrypt a text message using ECC & need to decrypt. Can
someone give me a sample for that process ?
You will probably have to give more information.
There are several different types of ECC methods, and inside these,
there are a couple of different elliptic curves you can choose from, and
some of them are standardized requirements for certain applications.
Furthermore, ECC is often used as a tool in a larger toolbox. It's
used to agree on a (shared) secret key for an underlying block or stream
cipher, and in some situations also for agreeing on message authentication
(which protects the message integrity against tampering).
Getting this toolbox / tooling construction wrong can result in the
proposed solution being insecure, so beware.
--
J.
--
J.
--
J.
Sanath Prasanna
2021-05-12 13:30:36 UTC
Permalink
Hi Jesper,
Sorry for trouble you.. Tx for your guidance far.
Br,
Robert..

On Wed, May 12, 2021 at 5:13 PM Jesper Louis Andersen <
Post by Jesper Louis Andersen
I'm not your Oracle.
Post by Sanath Prasanna
Jesper, any comment regarding my problem ?
Br,
Robert
Post by Sanath Prasanna
Tx Jsesper for your guidance. But still I cannot do that & error came
for below line
EncryptMsg = crypto:private_encrypt(rsa, Msg, ECPrivateKey,
rsa_no_padding),
here attached sample file.
On Wed, May 5, 2021 at 7:39 PM Jesper Louis Andersen <
Post by Jesper Louis Andersen
One particular problem is that `public_key:encrypt_private` is the RSA
algorithm, and not ECC. You need `crypto:private_encrypt/4` if you want to
do ECC.
Post by Sanath Prasanna
Tx Jesper for your kind response. Here attached my sample test file
& following one is not working. That is the expected other Encoding
scheme. (ShaXxxx)
EncryptMsg = public_key:encrypt_private(Msg, ECPublicKey), (line 64)
Can you give some guide to over come this ?
br,
Robert
On Tue, May 4, 2021 at 8:48 PM Jesper Louis Andersen <
Post by Jesper Louis Andersen
Post by Sanath Prasanna
Hi,
I want to encrypt a text message using ECC & need to decrypt. Can
someone give me a sample for that process ?
You will probably have to give more information.
There are several different types of ECC methods, and inside these,
there are a couple of different elliptic curves you can choose from, and
some of them are standardized requirements for certain applications.
Furthermore, ECC is often used as a tool in a larger toolbox. It's
used to agree on a (shared) secret key for an underlying block or stream
cipher, and in some situations also for agreeing on message authentication
(which protects the message integrity against tampering).
Getting this toolbox / tooling construction wrong can result in the
proposed solution being insecure, so beware.
--
J.
--
J.
--
J.
Loading...