Niels Möller wrote:

Excellent. If you have time to go through and fix other cases of
W64_ENTRY/W64_EXIT, please post a patch on the mailinglist (or a merge
request on git.lysator.liu.se/nettle/nettle). Otherwise I'll look into
it, but I'm a bit busy with other things this week.

It would also be nice to setup some windows tests in the ci system
(which runs on a repo mirror at
https://gitlab.com/gnutls/nettle/-/pipelines), cross-compile + wine would
be the easiest for me to setup, but I think there are also some windows
"runners" that could maybe be used to try native windows builds.

Good. But this means some MinGW build? Using Microsoft's 'cl'
seems impossible at the moment. E.g. how to  make 'configure.ac'
NOT assemble via 'cl'? Now I get:
   cl -I.  -DHAVE_CONFIG_H -nologo -MD    -c umac-nh.s
   cl : Command line warning D9024 : unrecognized source file type 'umac-nh.s', 
object file assumed
   cl : Command line warning D9027 : source file 'umac-nh.s' ignored
   cl : Command line warning D9021 : no action performed

And hence no .obj-file for that .s-file.

PS. I used a home-brewed GNU-makefile modelled
     after a Cygwin build. Plus I used only Mini-GMP,
     but .asm + AES asm-code.

I'm afraid I haven't ever tried native windows build myself. What's
preventing you from letting the configure script (in msys or cygwin)
create the Makefiles for you?

See above. And besides, a generated 'config.make' has
'NUM_BITS = 0' causing a div-by-zero exception in e.g.
   eccdata$(EXEEXT_FOR_BUILD) secp192r1 8 6 $(NUMB_BITS)

But this rule is not used !? All this autotool stuff is a
total obfuscated mess if you ask me. Hence my home-brewed GNU-
makefile. It and 'win32-missing.c' is here:
   https://gist.github.com/gvanem/2f78e7234be572720f12faf9988aa892

But the speed of e.g. 'nettle-benchmark.exe' absolutely sucks
compared to a Cygwin x64 build of the same. Results attached.

--
--gv

A Cygwin64 built version of 'nettle-benchmark.exe':

sha1_compress: 323.00 cycles
salsa20_core: 319.20 cycles
sha3_permute: 1417.40 cycles (59.06 / round)

         Algorithm         mode Mbyte/s
            memxor      aligned 55555.56
            memxor    unaligned 55555.56
           memxor3      aligned 25000.00
           memxor3  unaligned01 22727.27
           memxor3  unaligned11 12500.00
           memxor3  unaligned12 25000.00

               md2       update   12.50
               md4       update 1388.89
               md5       update  769.23
              sha1       update  781.25
            sha224       update  384.62
            sha256       update  357.14
            sha384       update  625.00
            sha512       update  625.00
        sha512-224       update  625.00
        sha512-256       update  714.29
          sha3_224       update  357.14
          sha3_256       update  357.14
          sha3_384       update  277.78
          sha3_512       update  178.57
         ripemd160       update  357.14
        gosthash94       update   76.92
      gosthash94cp       update   78.12
       streebog256       update  178.57
       streebog512       update  166.67
               sm3       update  357.14
            umac32       update 22727.27
            umac64       update 11363.64
            umac96       update 8928.57
           umac128       update 7142.86
       cmac-aes128       update 1000.00
      poly1305-aes       update 5000.00

            aes128  ECB encrypt 8928.57
            aes128  ECB decrypt 9615.38
            aes128  CBC encrypt  833.33
            aes128  CBC decrypt 8333.33
            aes128   (in-place) 5555.56
            aes128          CTR 7142.86
            aes128   (in-place) 5555.56

            aes192  ECB encrypt 7142.86
            aes192  ECB decrypt 7692.31
            aes192  CBC encrypt  714.29
            aes192  CBC decrypt 7142.86
            aes192   (in-place) 5000.00
            aes192          CTR 5555.56
            aes192   (in-place) 5000.00

            aes256  ECB encrypt 6250.00
            aes256  ECB decrypt 6250.00
            aes256  CBC encrypt  625.00
            aes256  CBC decrypt 5555.56
            aes256   (in-place) 3846.15
            aes256          CTR 5000.00
            aes256   (in-place) 3846.15

       blowfish128  ECB encrypt  227.27
       blowfish128  ECB decrypt  250.00
       blowfish128  CBC encrypt  142.86
       blowfish128  CBC decrypt  227.27
       blowfish128   (in-place)  227.27
       blowfish128          CTR  156.25
       blowfish128   (in-place)  156.25

       camellia128  ECB encrypt  227.27
       camellia128  ECB decrypt  227.27
       camellia128  CBC encrypt  181.82
       camellia128  CBC decrypt  208.33
       camellia128   (in-place)  208.33
       camellia128          CTR  178.57
       camellia128   (in-place)  208.33

       camellia192  ECB encrypt  156.25
       camellia192  ECB decrypt  156.25
       camellia192  CBC encrypt  138.89
       camellia192  CBC decrypt  156.25
       camellia192   (in-place)  156.25
       camellia192          CTR  142.86
       camellia192   (in-place)  156.25

       camellia256  ECB encrypt  156.25
       camellia256  ECB decrypt  156.25
       camellia256  CBC encrypt  125.00
       camellia256  CBC decrypt  156.25
       camellia256   (in-place)  156.25
       camellia256          CTR  142.86
       camellia256   (in-place)  156.25

           cast128  ECB encrypt  178.57
           cast128  ECB decrypt  178.57
           cast128  CBC encrypt  125.00
           cast128  CBC decrypt  178.57
           cast128   (in-place)  178.57
           cast128          CTR  138.89
           cast128   (in-place)  156.25

               des  ECB encrypt  111.11
               des  ECB decrypt  113.64
               des  CBC encrypt   89.29
               des  CBC decrypt  111.11
               des   (in-place)  125.00
               des          CTR  100.00
               des   (in-place)  111.11

              des3  ECB encrypt   38.46
              des3  ECB decrypt   38.46
              des3  CBC encrypt   35.71
              des3  CBC decrypt   38.46
              des3   (in-place)   38.46
              des3          CTR   35.71
              des3   (in-place)   35.71

        serpent256  ECB encrypt  277.78
        serpent256  ECB decrypt  357.14
        serpent256  CBC encrypt  100.00
        serpent256  CBC decrypt  357.14
        serpent256   (in-place)  357.14
        serpent256          CTR  277.78
        serpent256   (in-place)  312.50

        twofish128  ECB encrypt  227.27
        twofish128  ECB decrypt  250.00
        twofish128  CBC encrypt  178.57
        twofish128  CBC decrypt  277.78
        twofish128   (in-place)  250.00
        twofish128          CTR  250.00
        twofish128   (in-place)  227.27

        twofish192  ECB encrypt  227.27
        twofish192  ECB decrypt  250.00
        twofish192  CBC encrypt  178.57
        twofish192  CBC decrypt  250.00
        twofish192   (in-place)  277.78
        twofish192          CTR  250.00
        twofish192   (in-place)  227.27

        twofish256  ECB encrypt  227.27
        twofish256  ECB decrypt  250.00
        twofish256  CBC encrypt  178.57
        twofish256  CBC decrypt  250.00
        twofish256   (in-place)  250.00
        twofish256          CTR  227.27
        twofish256   (in-place)  227.27

               sm4  ECB encrypt  125.00
               sm4  ECB decrypt  125.00
               sm4  CBC encrypt  104.17
               sm4  CBC decrypt  125.00
               sm4   (in-place)  125.00
               sm4          CTR  125.00
               sm4   (in-place)  125.00

        arcfour128      encrypt  416.67
        arcfour128      decrypt  454.55

           salsa20      encrypt 1250.00
           salsa20      decrypt 1250.00

        salsa20r12      encrypt 1785.71
        salsa20r12      decrypt 1785.71

            chacha      encrypt  625.00
            chacha      decrypt  625.00

        cbc_aes128      encrypt 1562.50

        cbc_aes192      encrypt 1388.89

        cbc_aes256      encrypt 1250.00

        gcm_aes128      encrypt  625.00
        gcm_aes128      decrypt  625.00
        gcm_aes128       update  714.29

        gcm_aes192      encrypt  625.00
        gcm_aes192      decrypt  625.00
        gcm_aes192       update  714.29

        gcm_aes256      encrypt  625.00
        gcm_aes256      decrypt  625.00
        gcm_aes256       update  714.29

   gcm_camellia128      encrypt  166.67
   gcm_camellia128      decrypt  166.67
   gcm_camellia128       update  714.29

   gcm_camellia256      encrypt  125.00
   gcm_camellia256      decrypt  125.00
   gcm_camellia256       update  714.29

        eax_aes128      encrypt 1000.00
        eax_aes128      decrypt 1000.00
        eax_aes128       update 1111.11

   chacha_poly1305      encrypt  625.00
   chacha_poly1305      decrypt  625.00
   chacha_poly1305       update 5555.56

        ocb_aes128      encrypt 2777.78
        ocb_aes128      decrypt 2500.00
        ocb_aes128       update 3125.00
          hmac-md5     64 bytes  227.27
          hmac-md5    256 bytes  500.00
          hmac-md5   1024 bytes  714.29
          hmac-md5   4096 bytes  714.29
          hmac-md5   single msg  769.23
         hmac-sha1     64 bytes  192.31
         hmac-sha1    256 bytes  454.55
         hmac-sha1   1024 bytes  625.00
         hmac-sha1   4096 bytes  714.29
         hmac-sha1   single msg  714.29
       hmac-sha256     64 bytes  113.64
       hmac-sha256    256 bytes  250.00
       hmac-sha256   1024 bytes  357.14
       hmac-sha256   4096 bytes  384.62
       hmac-sha256   single msg  357.14
       hmac-sha512     64 bytes  125.00
       hmac-sha512    256 bytes  277.78
       hmac-sha512   1024 bytes  500.00
       hmac-sha512   4096 bytes  555.56
       hmac-sha512   single msg  555.56
A MSVC built version of 'nettle-benchmark.exe':

sha1_compress: 323.00 cycles
salsa20_core: 2690.40 cycles
sha3_permute: 8185.20 cycles (341.05 / round)

         Algorithm         mode Mbyte/s
            memxor      aligned 3338.68
            memxor    unaligned 2353.16
           memxor3      aligned 3338.68
           memxor3  unaligned01 2339.07
           memxor3  unaligned11 2353.16
           memxor3  unaligned12 1825.35

               md2       update    3.37
               md4       update  305.18
               md5       update  773.51
              sha1       update  758.50
            sha224       update  398.60
            sha256       update  402.71
            sha384       update  160.09
            sha512       update  160.09
        sha512-224       update  160.09
        sha512-256       update  158.79
          sha3_224       update   62.00
          sha3_256       update   59.19
          sha3_384       update   45.96
          sha3_512       update   32.55
         ripemd160       update  128.50
        gosthash94       update   36.85
      gosthash94cp       update   37.20
       streebog256       update   38.30
       streebog512       update   37.56
               sm3       update   73.70
            umac32       update 1896.24
            umac64       update 1276.55
            umac96       update  941.27
           umac128       update  809.59
       cmac-aes128       update  422.30
      poly1305-aes       update  417.78

            aes128  ECB encrypt 9952.23
            aes128  ECB decrypt 10080.65
            aes128  CBC encrypt  497.61
            aes128  CBC decrypt 2520.16
            aes128   (in-place) 1914.83
            aes128          CTR 1310.82
            aes128   (in-place) 1310.82

            aes192  ECB encrypt 7735.15
            aes192  ECB decrypt 7851.76
            aes192  CBC encrypt  494.46
            aes192  CBC decrypt 2353.16
            aes192   (in-place) 1860.12
            aes192          CTR 1293.46
            aes192   (in-place) 1252.00

            aes256  ECB encrypt 6351.63
            aes256  ECB decrypt 6250.00
            aes256  CBC encrypt  491.35
            aes256  CBC decrypt 2170.14
            aes256   (in-place) 1759.57
            aes256          CTR 1228.38
            aes256   (in-place) 1213.12

       blowfish128  ECB encrypt   94.13
       blowfish128  ECB decrypt   94.13
       blowfish128  CBC encrypt   75.12
       blowfish128  CBC decrypt   90.84
       blowfish128   (in-place)   90.84
       blowfish128          CTR   87.29
       blowfish128   (in-place)   85.38

       camellia128  ECB encrypt  220.69
       camellia128  ECB decrypt  218.23
       camellia128  CBC encrypt  147.96
       camellia128  CBC decrypt  205.59
       camellia128   (in-place)  200.32
       camellia128          CTR  193.38
       camellia128   (in-place)  189.62

       camellia192  ECB encrypt  160.09
       camellia192  ECB decrypt  160.09
       camellia192  CBC encrypt  120.56
       camellia192  CBC decrypt  155.01
       camellia192   (in-place)  150.24
       camellia192          CTR  143.61
       camellia192   (in-place)  143.61

       camellia256  ECB encrypt  161.42
       camellia256  ECB decrypt  160.09
       camellia256  CBC encrypt  119.09
       camellia256  CBC decrypt  151.41
       camellia256   (in-place)  147.96
       camellia256          CTR  143.61
       camellia256   (in-place)  143.61

           cast128  ECB encrypt   90.32
           cast128  ECB decrypt   89.80
           cast128  CBC encrypt   72.34
           cast128  CBC decrypt   88.28
           cast128   (in-place)   86.81
           cast128          CTR   83.56
           cast128   (in-place)   83.56

               des  ECB encrypt   34.88
               des  ECB decrypt   34.88
               des  CBC encrypt   31.50
               des  CBC decrypt   34.27
               des   (in-place)   33.97
               des          CTR   33.67
               des   (in-place)   34.27

              des3  ECB encrypt   11.56
              des3  ECB decrypt   11.56
              des3  CBC encrypt   10.85
              des3  CBC decrypt   11.42
              des3   (in-place)   11.42
              des3          CTR   11.56
              des3   (in-place)   11.49

        serpent256  ECB encrypt   49.14
        serpent256  ECB decrypt   49.14
        serpent256  CBC encrypt   21.35
        serpent256  CBC decrypt   47.93
        serpent256   (in-place)   47.64
        serpent256          CTR   47.93
        serpent256   (in-place)   47.93

        twofish128  ECB encrypt  100.16
        twofish128  ECB decrypt  104.45
        twofish128  CBC encrypt   86.33
        twofish128  CBC decrypt  101.20
        twofish128   (in-place)  100.16
        twofish128          CTR   93.56
        twofish128   (in-place)   93.56

        twofish192  ECB encrypt  102.12
        twofish192  ECB decrypt  104.17
        twofish192  CBC encrypt   86.33
        twofish192  CBC decrypt   99.52
        twofish192   (in-place)   99.52
        twofish192          CTR   94.13
        twofish192   (in-place)   92.46

        twofish256  ECB encrypt  100.81
        twofish256  ECB decrypt  102.12
        twofish256  CBC encrypt   83.11
        twofish256  CBC decrypt  100.81
        twofish256   (in-place)   98.89
        twofish256          CTR   95.86
        twofish256   (in-place)   97.05

               sm4  ECB encrypt   37.20
               sm4  ECB decrypt   36.51
               sm4  CBC encrypt   34.27
               sm4  CBC decrypt   36.17
               sm4   (in-place)   36.17
               sm4          CTR   36.17
               sm4   (in-place)   35.84

        arcfour128      encrypt  119.09
        arcfour128      decrypt  117.66

           salsa20      encrypt   81.38
           salsa20      decrypt   80.96

        salsa20r12      encrypt  123.62
        salsa20r12      decrypt  124.40

            chacha      encrypt   45.42
            chacha      decrypt   45.42

        cbc_aes128      encrypt 1614.15

        cbc_aes192      encrypt 1365.82

        cbc_aes256      encrypt 1176.58

        gcm_aes128      encrypt  122.07
        gcm_aes128      decrypt  122.07
        gcm_aes128       update  131.08

        gcm_aes192      encrypt  119.09
        gcm_aes192      decrypt  120.56
        gcm_aes192       update  131.08

        gcm_aes256      encrypt  119.09
        gcm_aes256      decrypt  120.56
        gcm_aes256       update  126.83

   gcm_camellia128      encrypt   78.91
   gcm_camellia128      decrypt   76.59
   gcm_camellia128       update  128.50

   gcm_camellia256      encrypt   67.93
   gcm_camellia256      decrypt   70.38
   gcm_camellia256       update  128.50

        eax_aes128      encrypt  382.97
        eax_aes128      decrypt  382.97
        eax_aes128       update  542.53

   chacha_poly1305      encrypt   40.90
   chacha_poly1305      decrypt   40.90
   chacha_poly1305       update  417.78

        ocb_aes128      encrypt  667.74
        ocb_aes128      decrypt  651.04
        ocb_aes128       update  789.14
          hmac-md5     64 bytes  207.78
          hmac-md5    256 bytes  467.81
          hmac-md5   1024 bytes  673.49
          hmac-md5   4096 bytes  744.05
          hmac-md5   single msg  785.18
         hmac-sha1     64 bytes  182.54
         hmac-sha1    256 bytes  429.26
         hmac-sha1   1024 bytes  635.16
         hmac-sha1   4096 bytes  723.38
         hmac-sha1   single msg  744.05
       hmac-sha256     64 bytes  105.57
       hmac-sha256    256 bytes  232.51
       hmac-sha256   1024 bytes  345.69
       hmac-sha256   4096 bytes  382.97
       hmac-sha256   single msg  400.64
       hmac-sha512     64 bytes   35.19
       hmac-sha512    256 bytes   77.35
       hmac-sha512   1024 bytes  127.66
       hmac-sha512   4096 bytes  150.24
       hmac-sha512   single msg  157.51
_______________________________________________
nettle-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to