Re: failing in reproducing .so files

2019-06-15 Thread Giovanni Fontana
Thanks Salz,
That investigation I will do for all the files I added, but for sure is not
that case for the API I added (EVP_PKEY_get0_TUV)  since is in a "native"
openssl file (crypto/evp/p_lib.c and include/openssl/evp.h)... But OK it
could be a side effect.

Il giorno ven 14 giu 2019 alle ore 20:48 Salz, Rich  ha
scritto:

> If you are adding new functions to the library, you need to
>
> 1A   Make sure there is a prototype in one of the existing OpenSSL
> header files;
>
> OR
>
> 1B   If your prototype is in a new header file, you will have to
> edit Configurations/unix-Makefile.tmpl to pick up that file.
>
>
>
> 2  Run configure
>
>
>
> 3.Do “make update”  Verify that the previous steps worked by
> looking for your new function(s) being declared in util/libcrypto.num
>
>
>
> 4.Run make
>
>
>
> This could be documented somewhere; anyone want to copy this email into a
> new issue?
>


Re: failing in reproducing .so files

2019-06-14 Thread Giovanni Fontana
...I just tried once more and (after a make clean) I run again a make
update, but it is stopped always in the same place. No more commands in
that specific terminal.
After that opening a new terminal and run the make, of course, I get the
same error again (Error: EVP_PKEY_get0_TUV does not have a number assigned).


Il giorno ven 14 giu 2019 alle ore 20:16 Dmitry Belyavsky 
ha scritto:

> It's worth trying to run make update before running make.
>
> пт, 14 июн. 2019 г., 20:13 Giovanni Fontana  >:
>
>> A little bit further...with my problem in trying to build a tailored
>> version of openSSL.
>>
>> If I do make I get at the end of building (trying to make .map file
>> before the .so files )
>>
>>  creating test/libtestutil.a
>> ranlib test/libtestutil.a || echo Never mind.
>> /usr/bin/perl util/mkdef.pl crypto linux > libcrypto.map
>> Error: EVP_PKEY_get0_TUV does not have a number assigned
>> Makefile:762: recipe for target 'libcrypto.map' failed
>> make[1]: *** [libcrypto.map] Error 25
>> make[1]: Leaving directory
>> '/home/vm/progetti/OPEN_SSL/OPEN_SSL_QP/openssl-1.1.1b'
>> Makefile:172: recipe for target 'all' failed
>> make: *** [all] Error 2
>>
>>
>>
>> ...where EVP_PKEY_get0_TUV is a proprietary function similar to
>> EVP_PKEY_get0_RSA (),
>> Usually with a function that *does not have a number assigned *it could
>> be ok to do a *make update*, but when I run a *make update* it stopped
>> after a small while without concluding the action (and no more commands I
>> can run in that terminal window).
>> Here the log:
>>
>> ( cd .; /usr/bin/perl VMS/VMSify-conf.pl \
>> < apps/openssl.cnf > apps/openssl-vms.cnf )
>> ( cd .; /usr/bin/perl crypto/bn/bn_prime.pl > crypto/bn/bn_prime.h )
>> ( cd .; /usr/bin/perl crypto/objects/objects.pl -n \
>> crypto/objects/objects.txt \
>> crypto/objects/obj_mac.num \
>> > crypto/objects/obj_mac.new && \
>> mv crypto/objects/obj_mac.new crypto/objects/obj_mac.num )
>> ( cd .; /usr/bin/perl crypto/objects/objects.pl \
>> crypto/objects/objects.txt \
>> crypto/objects/obj_mac.num \
>> > include/openssl/obj_mac.h )
>> ( cd .; /usr/bin/perl crypto/objects/obj_dat.pl \
>> include/openssl/obj_mac.h \
>> > crypto/objects/obj_dat.h )
>> ( cd .; /usr/bin/perl crypto/objects/objxref.pl \
>> crypto/objects/obj_mac.num \
>> crypto/objects/obj_xref.txt \
>> > crypto/objects/obj_xref.h )
>> ( cd .; /usr/bin/perl crypto/conf/keysets.pl \
>> > crypto/conf/conf_def.h )
>> ( cd .; /usr/bin/perl crypto/asn1/charmap.pl \
>> > crypto/asn1/charmap.h )
>> ( cd .; /usr/bin/perl fuzz/mkfuzzoids.pl \
>> crypto/objects/obj_dat.h \
>>     > fuzz/oids.txt )
>> ( b=`pwd`; set -e; cd .; \
>>   /usr/bin/perl util/ck_errf.pl -strict -internal; \
>>   /usr/bin/perl -I$b util/mkerr.pl  -internal )
>>
>>
>>
>>
>> ... as I said the compilation is OK for each file (even the one with
>> EVP_PKEY_get0_TUV) , but then no .so libraries. Any suggestions?
>>
>> Kind regards
>> Giovanni Fontana
>>
>>
>>
>>
>> Il giorno lun 10 giu 2019 alle ore 16:12 Kyle Hamilton <
>> aerow...@gmail.com> ha scritto:
>>
>>> In the unmodified directory:
>>> $ make clean
>>> $ make 2>&1 | tee /tmp/openssl-working-build.log
>>>
>>> In the modified directory:
>>> $ make clean
>>> $ make 2>&1 | tee /tmp/openssl-broken-build.log
>>>
>>> $ diff /tmp/openssl-working-build.log /tmp/openssl-broken-build.log |
>>> ${PAGER:more}
>>>
>>> Take note of the differences in output, and use that to determine what
>>> broke.  (the '2>&1' syntax redirects stderr to stdout, which is very useful
>>> when you need to capture why something is failing.)
>>>
>>> Good luck.
>>>
>>> -Kyle H
>>>
>>> On Mon, Jun 10, 2019, 03:34 Giovanni Fontana <
>>> giovanni.fontan...@gmail.com> wrote:
>>>
>>>> The unmodified version works. As I said, it's sure the issue is on what
>>>> I added, but info from the building logs is not sufficient to figure out
>>>> what is the issue there. So as result of the building I have just:
>>>>
>>>>- libcrypto.a
>>>>- libssl.a
>>>

Re: failing in reproducing .so files

2019-06-14 Thread Giovanni Fontana
A little bit further...with my problem in trying to build a tailored
version of openSSL.

If I do make I get at the end of building (trying to make .map file before
the .so files )

 creating test/libtestutil.a
ranlib test/libtestutil.a || echo Never mind.
/usr/bin/perl util/mkdef.pl crypto linux > libcrypto.map
Error: EVP_PKEY_get0_TUV does not have a number assigned
Makefile:762: recipe for target 'libcrypto.map' failed
make[1]: *** [libcrypto.map] Error 25
make[1]: Leaving directory
'/home/vm/progetti/OPEN_SSL/OPEN_SSL_QP/openssl-1.1.1b'
Makefile:172: recipe for target 'all' failed
make: *** [all] Error 2



...where EVP_PKEY_get0_TUV is a proprietary function similar to
EVP_PKEY_get0_RSA (),
Usually with a function that *does not have a number assigned *it could be
ok to do a *make update*, but when I run a *make update* it stopped after a
small while without concluding the action (and no more commands I can run
in that terminal window).
Here the log:

( cd .; /usr/bin/perl VMS/VMSify-conf.pl \
< apps/openssl.cnf > apps/openssl-vms.cnf )
( cd .; /usr/bin/perl crypto/bn/bn_prime.pl > crypto/bn/bn_prime.h )
( cd .; /usr/bin/perl crypto/objects/objects.pl -n \
crypto/objects/objects.txt \
crypto/objects/obj_mac.num \
> crypto/objects/obj_mac.new && \
mv crypto/objects/obj_mac.new crypto/objects/obj_mac.num )
( cd .; /usr/bin/perl crypto/objects/objects.pl \
crypto/objects/objects.txt \
crypto/objects/obj_mac.num \
> include/openssl/obj_mac.h )
( cd .; /usr/bin/perl crypto/objects/obj_dat.pl \
include/openssl/obj_mac.h \
> crypto/objects/obj_dat.h )
( cd .; /usr/bin/perl crypto/objects/objxref.pl \
crypto/objects/obj_mac.num \
crypto/objects/obj_xref.txt \
> crypto/objects/obj_xref.h )
( cd .; /usr/bin/perl crypto/conf/keysets.pl \
> crypto/conf/conf_def.h )
( cd .; /usr/bin/perl crypto/asn1/charmap.pl \
> crypto/asn1/charmap.h )
( cd .; /usr/bin/perl fuzz/mkfuzzoids.pl \
crypto/objects/obj_dat.h \
> fuzz/oids.txt )
( b=`pwd`; set -e; cd .; \
  /usr/bin/perl util/ck_errf.pl -strict -internal; \
  /usr/bin/perl -I$b util/mkerr.pl  -internal )




... as I said the compilation is OK for each file (even the one with
EVP_PKEY_get0_TUV) , but then no .so libraries. Any suggestions?

Kind regards
Giovanni Fontana




Il giorno lun 10 giu 2019 alle ore 16:12 Kyle Hamilton 
ha scritto:

> In the unmodified directory:
> $ make clean
> $ make 2>&1 | tee /tmp/openssl-working-build.log
>
> In the modified directory:
> $ make clean
> $ make 2>&1 | tee /tmp/openssl-broken-build.log
>
> $ diff /tmp/openssl-working-build.log /tmp/openssl-broken-build.log |
> ${PAGER:more}
>
> Take note of the differences in output, and use that to determine what
> broke.  (the '2>&1' syntax redirects stderr to stdout, which is very useful
> when you need to capture why something is failing.)
>
> Good luck.
>
> -Kyle H
>
> On Mon, Jun 10, 2019, 03:34 Giovanni Fontana 
> wrote:
>
>> The unmodified version works. As I said, it's sure the issue is on what I
>> added, but info from the building logs is not sufficient to figure out what
>> is the issue there. So as result of the building I have just:
>>
>>- libcrypto.a
>>- libssl.a
>>- libcrypto.map
>>
>>
>> so what is missing are the following files:
>>
>>- libssl.map
>>- libcrypto.so
>>- libssl.so
>>
>>
>> Il giorno dom 9 giu 2019 alle ore 19:30 Kyle Hamilton 
>> ha scritto:
>>
>>> Can you try building an unmodified version of the tarball, and see if it
>>> has a problem?
>>>
>>> -Kyle
>>>
>>> On Sun, Jun 9, 2019, 07:31 Giovanni Fontana <
>>> giovanni.fontan...@gmail.com> wrote:
>>>
>>>> Hello Kurt,
>>>>
>>>>
>>>>- it's perl 5, version 26, subversion 1 (v5.26.1) built for
>>>>x86_64-linux-gnu-thread-multi
>>>>- ldd (Ubuntu GLIBC 2.27-3ubuntu1) 2.27
>>>>
>>>>
>>>> I guess is something from what I added since the original OPENSSL I'm
>>>> able to build, as well as other intermediate modifications. My issue is
>>>> it looks like the log doesn't give so much info and also the *make
>>>> update* doesn't complete his task.
>>>>
>>>> BR
>>>> Giovanni
>>>>
>>>> Il giorno sab 8 giu 2019 alle ore 18:07 Kurt Roeckx 
>>>> ha scritto:
>>>>
>>>>> On Sat, Jun 08, 2019 at 12:26:30AM +0200, Giovanni Fontana wrote:
>>>>> > */usr/bin/ld:libcrypto.map:0: syntax error in VERSION scriptcollect2:
>>>>>
>>>>> There seems to be a problem generating the libcrypto.map file for
>>>>> you. What does the file look like? Which perl version are you
>>>>> using? Which libc do you use?
>>>>>
>>>>>
>>>>> Kurt
>>>>>
>>>>>


Re: failing in reproducing .so files

2019-06-10 Thread Giovanni Fontana
The unmodified version works. As I said, it's sure the issue is on what I
added, but info from the building logs is not sufficient to figure out what
is the issue there. So as result of the building I have just:

   - libcrypto.a
   - libssl.a
   - libcrypto.map


so what is missing are the following files:

   - libssl.map
   - libcrypto.so
   - libssl.so


Il giorno dom 9 giu 2019 alle ore 19:30 Kyle Hamilton 
ha scritto:

> Can you try building an unmodified version of the tarball, and see if it
> has a problem?
>
> -Kyle
>
> On Sun, Jun 9, 2019, 07:31 Giovanni Fontana 
> wrote:
>
>> Hello Kurt,
>>
>>
>>- it's perl 5, version 26, subversion 1 (v5.26.1) built for
>>x86_64-linux-gnu-thread-multi
>>- ldd (Ubuntu GLIBC 2.27-3ubuntu1) 2.27
>>
>>
>> I guess is something from what I added since the original OPENSSL I'm
>> able to build, as well as other intermediate modifications. My issue is
>> it looks like the log doesn't give so much info and also the *make
>> update* doesn't complete his task.
>>
>> BR
>> Giovanni
>>
>> Il giorno sab 8 giu 2019 alle ore 18:07 Kurt Roeckx  ha
>> scritto:
>>
>>> On Sat, Jun 08, 2019 at 12:26:30AM +0200, Giovanni Fontana wrote:
>>> > */usr/bin/ld:libcrypto.map:0: syntax error in VERSION scriptcollect2:
>>>
>>> There seems to be a problem generating the libcrypto.map file for
>>> you. What does the file look like? Which perl version are you
>>> using? Which libc do you use?
>>>
>>>
>>> Kurt
>>>
>>>


Re: failing in reproducing .so files

2019-06-09 Thread Giovanni Fontana
Hello Kurt,


   - it's perl 5, version 26, subversion 1 (v5.26.1) built for
   x86_64-linux-gnu-thread-multi
   - ldd (Ubuntu GLIBC 2.27-3ubuntu1) 2.27


I guess is something from what I added since the original OPENSSL I'm able
to build, as well as other intermediate modifications. My issue is it looks
like the log doesn't give so much info and also the *make update* doesn't
complete his task.

BR
Giovanni

Il giorno sab 8 giu 2019 alle ore 18:07 Kurt Roeckx  ha
scritto:

> On Sat, Jun 08, 2019 at 12:26:30AM +0200, Giovanni Fontana wrote:
> > */usr/bin/ld:libcrypto.map:0: syntax error in VERSION scriptcollect2:
>
> There seems to be a problem generating the libcrypto.map file for
> you. What does the file look like? Which perl version are you
> using? Which libc do you use?
>
>
> Kurt
>
>


failing in reproducing .so files

2019-06-07 Thread Giovanni Fontana
Hello everybody,
I'm working on tailoring openssl (v1.1.1b) for various purposes.
Trying to compile (sending the command make on the terminal of linux) it
looks quite good the building of every files. At the end the files
libcrypto.a and libssl.a are produced, but not the ones with the extension
.so

At the end of building log I got the following:







*/usr/bin/ld:libcrypto.map:0: syntax error in VERSION scriptcollect2:
error: ld returned 1 exit statusMakefile:754: recipe for target
'libcrypto.so' failedmake[1]: *** [libcrypto.so] Error 1make[1]: Leaving
directory '/home/vm/progetti/OPEN_SSL/OPEN_SSL/openssl-1.1.1b'Makefile:172:
recipe for target 'all' failedmake: *** [all] Error 2*



No other errors are shown in the entire log.
Sending "make update" command it will not finish the execution (see below)






























*vm@vm-VirtualBox:~/progetti/OPEN_SSL/OPEN_SSL_QP/openssl-1.1.1b$ make
update( cd .; /usr/bin/perl VMS/VMSify-conf.pl \<
apps/openssl.cnf > apps/openssl-vms.cnf )( cd .; /usr/bin/perl
crypto/bn/bn_prime.pl <http://bn_prime.pl> > crypto/bn/bn_prime.h )( cd .;
/usr/bin/perl crypto/objects/objects.pl <http://objects.pl> -n \
crypto/objects/objects.txt \crypto/objects/obj_mac.num \
> crypto/objects/obj_mac.new && \mv crypto/objects/obj_mac.new
crypto/objects/obj_mac.num )( cd .; /usr/bin/perl crypto/objects/objects.pl
<http://objects.pl> \crypto/objects/objects.txt \
crypto/objects/obj_mac.num \> include/openssl/obj_mac.h )( cd
.; /usr/bin/perl crypto/objects/obj_dat.pl <http://obj_dat.pl> \
include/openssl/obj_mac.h \> crypto/objects/obj_dat.h )( cd .;
/usr/bin/perl crypto/objects/objxref.pl <http://objxref.pl> \
crypto/objects/obj_mac.num \crypto/objects/obj_xref.txt \
> crypto/objects/obj_xref.h )( cd .; /usr/bin/perl
crypto/conf/keysets.pl <http://keysets.pl> \>
crypto/conf/conf_def.h )( cd .; /usr/bin/perl crypto/asn1/charmap.pl
<http://charmap.pl> \> crypto/asn1/charmap.h )( cd .;
/usr/bin/perl fuzz/mkfuzzoids.pl <http://mkfuzzoids.pl> \
crypto/objects/obj_dat.h \> fuzz/oids.txt )( b=`pwd`; set -e;
cd .; \  /usr/bin/perl util/ck_errf.pl <http://ck_errf.pl> -strict
-internal; \  /usr/bin/perl -I$b util/mkerr.pl <http://mkerr.pl>
-internal )*


Any help?
Thanks in advance
Giovanni Fontana


Re: new algorithms

2019-04-08 Thread Giovanni Fontana
Thank you every one for the answers and tips, really a great and active
group!

Thank you also to Teja and Tobias who has just wrote some suggestion on how
I can  have a technical shortcut to prove the functionality of my
algorithms in very limited environment.
What I asked is to move a first step (after the algorithms) to have a demo
before to setup a company.
For my limited knowledge I know  the algorithms need to be published and
security must be proved for some authorities. All I need to prove is the
algorithms works in the real world and openSSL is one of the most used tool
to do that, then the other steps

Thank you again for your answer, this is what I really need.

Giovanni



Il giorno lun 8 apr 2019 alle ore 19:23 Teja Prabhu <213...@gmail.com> ha
scritto:

> 1. dasync_aes128_cbc_cipher (search for this in
> https://github.com/openssl/openssl/blob/master/engines/e_dasync.c) ||
> replace it with your symmetric cipher, and do the same for RSA.
> 2. setup a server and client and hard-code the symmetric & asymmetric
> ciphers to your ciphers
> 3. your idea is simply not going to work. Like Tobias said, you have to
> add them manually. I suggest you simply not use OpenSSL or any TLS library,
> unless you have a lot of clout in the International Communication Union.
>
> You can take Mega's approach and use javascript since every browser under
> the sun has it (as an additional layer over TLS).
>
> Teja Prabhu
>
>
> On Mon, Apr 8, 2019 at 7:06 PM Tobias Nießen  wrote:
>
>> > creation of x509 certificate with algo1 and algo2, and/or TLS and SSL
>> > connection always with algo1 and algo2
>> As far as I know, you will need to have an OID assigned for each
>> algorithm for x509 certificates. You can add those to OpenSSL manually,
>> but you won't be able to communicate with any other software that does
>> not implement them. (And as Rich said, there is little reason for people
>> to trust and use non-standard algorithms.)
>>
>


Re: new algorithms

2019-04-08 Thread Giovanni Fontana
Hi Clarke,

Thanks for the email.
Sure, I want to publish the algorithm, but not yet... waiting for
establishing a company.
For similar reasons no github usage at moment.

Giovanni



Il giorno lun 8 apr 2019 alle 18:06 Dennis Clarke 
ha scritto:

> On 4/8/19 11:48 AM, Giovanni Fontana wrote:
> > Hello everybody,
> >
> > my name is Giovanni Fontana. I made a new symmetric crypto algorithm
> > (let’s call it *algo1*) and a new asymmetric crypto algorithm (let’s
> > call it *algo2*).
> >
> > I use algo2 for key exchange and with that I can create a session key to
> > cipher and decipher with algo1, so Alice and Bob can communicate each
> > other in secure way.
>
> I think you would need to publish the algorithm at some point. Is there
> a github link perhaps?
>
> Dennis
>
>
>


new algorithms

2019-04-08 Thread Giovanni Fontana
Hello everybody,

my name is Giovanni Fontana. I made a new symmetric crypto algorithm (let’s
call it *algo1*) and a new asymmetric crypto algorithm (let’s call it
*algo2*).

I use algo2 for key exchange and with that I can create a session key to
cipher and decipher with algo1, so Alice and Bob can communicate each other
in secure way.

I wish to import those algorithms inside OpenSSL in order to use some
features of this suite (i.e. creation of x509 certificate with algo1 and
algo2, and/or TLS and SSL connection always with algo1 and algo2).
My first tries were not successful.
Could you please tell me each step I have to do in order to achieve my
targets? Or share with me some Internet links where those steps are already
defined?

Below some info that may help you in answer me:
- The version of OpenSSL I’m playing with is 1.1.1b
- The OS is Linux Ubuntu 14.04
- Of course my algorithms are written in C.

Further question (probably to ask elsewhere inside OpenSSL organisation):
If in the next future with my algorithms I can have some business, which
kind of license I need to have with OpenSSL then?

Thank in advance
Kind regards