Hi All,

in file ec2n.cpp is a little bug; in ecp.cpp it is fixed in an earlier
version but forgotton in ec2n.cpp:

********yours-ec2n.cpp
        m_field->BERDecodeElement(seq, m_b);
        // skip optional seed
        if (!seq.EndReached())
23c23,27
<               BERDecodeOctetString(seq, TheBitBucket());
---mine-ec2n.cpp
>       {
>               SecByteBlock seed;
>               unsigned int unused;
>               BERDecodeBitString(seq, seed, unused);
>       }
        seq.MessageEnd();
  }

==============================================
The whole constructor should look like in ECP::ECP or as seen below
(optional seed is actually coded as a bit string):

EC2N::EC2N(BufferedTransformation &bt)
        : m_field(BERDecodeGF2NP(bt))
{
        BERSequenceDecoder seq(bt);
        m_field->BERDecodeElement(seq, m_a);
        m_field->BERDecodeElement(seq, m_b);
        // skip optional seed
        if (!seq.EndReached())
        {
                SecByteBlock seed;
                unsigned int unused;
                BERDecodeBitString(seq, seed, unused);
        }
        seq.MessageEnd();
}
==============================================

Best Regards

Andreas Menke

-----------------------------
Diplom-Informatiker (Uni.)
Andreas Menke
Team Leader, Development

OPENLiMiT SignCubes GmbH
Saarbrücker Str. 38 A
D-10405 Berlin

Fon: +49 30 868 766 – 10
Fax: +49 30 868 766 – 11
[email protected]
www.openlimit.com

Geschäftsführer:
Heinrich Dattler, Armin Lunkeit
Nadine Model (Prokuristin)
Sitz der Gesellschaft: Berlin
Amtsgericht Charlottenburg HRB 86352 B
Finanzamt für Körperschaften II
St.-Nr. 37/155/20819
USt-ID: DE 224136339




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---

Reply via email to