Re: Re: Retrieving public key from x and y

Benjamin Schäfer <[email protected]>
Newsgroups gmane.comp.encryption.cryptopp
Message-ID <[email protected]>
First of all: Thank you for your help and your patience! I really 
appreciate that.

I've made the same steps with nmake and built the library. Then I did the 
same steps with my source file you mentioned, everything on the CTL that 
came with VS2019 (should make no difference). 

I uploaded the files here:
https://github.com/bredator/cryptopptest

Everything took place in the same directory where the cryptopp .h and .cpp 
files are located - so I didn't upload them again, because I took them out 
of the box. Also I added my .pem file, that came out as I reproduced all 
the steps. 

Jeffrey Walton schrieb am Donnerstag, 16. September 2021 um 09:33:26 UTC+2:

> On Thu, Sep 16, 2021 at 2:44 AM Benjamin Schäfer <[email protected]> 
> wrote:
> >
> > Ok, at least this gives me a ray of hope. So, to get rid of any 
> interfering codelines, I did:
> >
> > - Start Visual Studio
> > - New project (MFC Console, static linked MFC, Multibyte (unicode brings 
> up the same result)
>
> My Windows testing looks OK to me.
>
> I guess you are going to have to put your project somewhere we can see
> it, like GitHub. I'll clone it and try to duplicate the issue.
>
> Here's what I did for Windows testing... I add the PEM source files to
> the nmake file:
>
> $ git diff
> diff --git a/cryptest.nmake b/cryptest.nmake
> index 1164c25f..3e0bba0c 100644
> --- a/cryptest.nmake
> +++ b/cryptest.nmake
> @@ -84,7 +84,8 @@ LIB_SRCS = \
> sse_simd.cpp strciphr.cpp tea.cpp tftables.cpp threefish.cpp tiger.cpp \
> tigertab.cpp ttmac.cpp tweetnacl.cpp twofish.cpp vmac.cpp wake.cpp \
> whrlpool.cpp xed25519.cpp xtr.cpp xtrcrypt.cpp xts.cpp zdeflate.cpp \
> - zinflate.cpp zlib.cpp
> + zinflate.cpp zlib.cpp \
> + pem_common.cpp pem_read.cpp pem_write.cpp x509cert.cpp
>
> LIB_OBJS = \
> cryptlib.obj cpu.obj integer.obj 3way.obj adler32.obj algebra.obj \
> @@ -115,7 +116,8 @@ LIB_OBJS = \
> sse_simd.obj strciphr.obj tea.obj tftables.obj threefish.obj tiger.obj \
> tigertab.obj ttmac.obj tweetnacl.obj twofish.obj vmac.obj wake.obj \
> whrlpool.obj xed25519.obj xtr.obj xtrcrypt.obj xts.obj zdeflate.obj \
> - zinflate.obj zlib.obj
> + zinflate.obj zlib.obj \
> + pem_common.obj pem_read.obj pem_write.obj x509cert.obj
>
> ASM_OBJS = \
> rdrand-x86.obj rdrand-x64.obj rdseed-x86.obj rdseed-x64.obj
> x64masm.obj x64dll.obj
>
> Then, from a Developer Prompt, build the library:
>
> >nmake /f cryptest.nmake
> ...
>
> Build the test program test.cxx:
>
> cl.exe /nologo /W4 /wd4231 /wd4511 /wd4156 /D_MBCS /Zi /TP /GR /EHsc
> /DNDEBUG /D_NDEBUG /Oi /Oy /O2 /MT /FI sdkddkver.h /FI winapifamily.h
> /c test.cxx /out:test_pem.obj
>
> Link the test program:
>
> link.exe /nologo /SUBSYSTEM:CONSOLE /DEBUG /DEBUG /OPT:REF
> /MACHINE:X64 test_pem.obj cryptlib.lib kernel32.lib /out:test_pem.exe
>
> Run the test program:
>
> C:\Users\Jeff\Desktop\cryptopp>.\test_pem.exe
>
> And dump the contents for the PEM file:
>
> C:\Users\Jeff\Desktop\cryptopp>type pubkey.pem
> -----BEGIN PUBLIC KEY-----
> MFowFAYHKoZIzj0CAQYJKyQDAwIIAQEHA0IABEC6Sfy6RcfusiYbG+Drx8FNZIS5
> 74ojsGDr5n+XJSu8mHuknfNkoMmSbytt4br0YGihOixcmBKy80UfSLdXGe4=
> -----END PUBLIC KEY-----
>
> I used Visual Studio 2017 Command Line Tools (CLT). But just about any
> modern version of Visual Studio should produce the same results. In
> fact, I use cryptest.nmake to test back to Visual Studio 2003.
>
> Jeff
>

-- 
You received this message because you are subscribed to the Google Groups "Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/cryptopp-users/57f410e5-c627-419a-9a48-b6b4232db8d0n%40googlegroups.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.