cjson
fuzzing
inputs
test1 test10 test11 test2 test3 test3.bu test3.uf test3.uu test4 test5 test6 test7 test8 test9library_config
cJSONConfig.cmake.in cJSONConfigVersion.cmake.in libcjson.pc.in libcjson_utils.pc.in uninstall.cmaketests
inputs
test1 test1.expected test10 test10.expected test11 test11.expected test2 test2.expected test3 test3.expected test4 test4.expected test5 test5.expected test6 test7 test7.expected test8 test8.expected test9 test9.expectedjson-patch-tests
.editorconfig .gitignore .npmignore README.md cjson-utils-tests.json package.json spec_tests.json tests.jsonunity
auto
colour_prompt.rb colour_reporter.rb generate_config.yml generate_module.rb generate_test_runner.rb parse_output.rb stylize_as_junit.rb test_file_filter.rb type_sanitizer.rb unity_test_summary.py unity_test_summary.rb unity_to_junit.pydocs
ThrowTheSwitchCodingStandard.md UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf UnityAssertionsReference.md UnityConfigurationGuide.md UnityGettingStartedGuide.md UnityHelperScriptsGuide.md license.txtexamples
unity_config.hcurl
.github
scripts
cleancmd.pl cmp-config.pl cmp-pkg-config.sh codespell-ignore.words codespell.sh distfiles.sh pyspelling.words pyspelling.yaml randcurl.pl requirements-docs.txt requirements-proselint.txt requirements.txt shellcheck-ci.sh shellcheck.sh spellcheck.curl trimmarkdownheader.pl typos.sh typos.toml verify-examples.pl verify-synopsis.pl yamlcheck.sh yamlcheck.yamlworkflows
appveyor-status.yml checkdocs.yml checksrc.yml checkurls.yml codeql.yml configure-vs-cmake.yml curl-for-win.yml distcheck.yml fuzz.yml http3-linux.yml label.yml linux-old.yml linux.yml macos.yml non-native.yml windows.ymlCMake
CurlSymbolHiding.cmake CurlTests.c FindBrotli.cmake FindCares.cmake FindGSS.cmake FindGnuTLS.cmake FindLDAP.cmake FindLibbacktrace.cmake FindLibgsasl.cmake FindLibidn2.cmake FindLibpsl.cmake FindLibssh.cmake FindLibssh2.cmake FindLibuv.cmake FindMbedTLS.cmake FindNGHTTP2.cmake FindNGHTTP3.cmake FindNGTCP2.cmake FindNettle.cmake FindQuiche.cmake FindRustls.cmake FindWolfSSL.cmake FindZstd.cmake Macros.cmake OtherTests.cmake PickyWarnings.cmake Utilities.cmake cmake_uninstall.in.cmake curl-config.in.cmake unix-cache.cmake win32-cache.cmakedocs
cmdline-opts
.gitignore CMakeLists.txt MANPAGE.md Makefile.am Makefile.inc _AUTHORS.md _BUGS.md _DESCRIPTION.md _ENVIRONMENT.md _EXITCODES.md _FILES.md _GLOBBING.md _NAME.md _OPTIONS.md _OUTPUT.md _PROGRESS.md _PROTOCOLS.md _PROXYPREFIX.md _SEEALSO.md _SYNOPSIS.md _URL.md _VARIABLES.md _VERSION.md _WWW.md abstract-unix-socket.md alt-svc.md anyauth.md append.md aws-sigv4.md basic.md ca-native.md cacert.md capath.md cert-status.md cert-type.md cert.md ciphers.md compressed-ssh.md compressed.md config.md connect-timeout.md connect-to.md continue-at.md cookie-jar.md cookie.md create-dirs.md create-file-mode.md crlf.md crlfile.md curves.md data-ascii.md data-binary.md data-raw.md data-urlencode.md data.md delegation.md digest.md disable-eprt.md disable-epsv.md disable.md disallow-username-in-url.md dns-interface.md dns-ipv4-addr.md dns-ipv6-addr.md dns-servers.md doh-cert-status.md doh-insecure.md doh-url.md dump-ca-embed.md dump-header.md ech.md egd-file.md engine.md etag-compare.md etag-save.md expect100-timeout.md fail-early.md fail-with-body.md fail.md false-start.md follow.md form-escape.md form-string.md form.md ftp-account.md ftp-alternative-to-user.md ftp-create-dirs.md ftp-method.md ftp-pasv.md ftp-port.md ftp-pret.md ftp-skip-pasv-ip.md ftp-ssl-ccc-mode.md ftp-ssl-ccc.md ftp-ssl-control.md get.md globoff.md happy-eyeballs-timeout-ms.md haproxy-clientip.md haproxy-protocol.md head.md header.md help.md hostpubmd5.md hostpubsha256.md hsts.md http0.9.md http1.0.md http1.1.md http2-prior-knowledge.md http2.md http3-only.md http3.md ignore-content-length.md insecure.md interface.md ip-tos.md ipfs-gateway.md ipv4.md ipv6.md json.md junk-session-cookies.md keepalive-cnt.md keepalive-time.md key-type.md key.md knownhosts.md krb.md libcurl.md limit-rate.md list-only.md local-port.md location-trusted.md location.md login-options.md mail-auth.md mail-from.md mail-rcpt-allowfails.md mail-rcpt.md mainpage.idx manual.md max-filesize.md max-redirs.md max-time.md metalink.md mptcp.md negotiate.md netrc-file.md netrc-optional.md netrc.md next.md no-alpn.md no-buffer.md no-clobber.md no-keepalive.md no-npn.md no-progress-meter.md no-sessionid.md noproxy.md ntlm-wb.md ntlm.md oauth2-bearer.md out-null.md output-dir.md output.md parallel-immediate.md parallel-max-host.md parallel-max.md parallel.md pass.md path-as-is.md pinnedpubkey.md post301.md post302.md post303.md preproxy.md progress-bar.md proto-default.md proto-redir.md proto.md proxy-anyauth.md proxy-basic.md proxy-ca-native.md proxy-cacert.md proxy-capath.md proxy-cert-type.md proxy-cert.md proxy-ciphers.md proxy-crlfile.md proxy-digest.md proxy-header.md proxy-http2.md proxy-insecure.md proxy-key-type.md proxy-key.md proxy-negotiate.md proxy-ntlm.md proxy-pass.md proxy-pinnedpubkey.md proxy-service-name.md proxy-ssl-allow-beast.md proxy-ssl-auto-client-cert.md proxy-tls13-ciphers.md proxy-tlsauthtype.md proxy-tlspassword.md proxy-tlsuser.md proxy-tlsv1.md proxy-user.md proxy.md proxy1.0.md proxytunnel.md pubkey.md quote.md random-file.md range.md rate.md raw.md referer.md remote-header-name.md remote-name-all.md remote-name.md remote-time.md remove-on-error.md request-target.md request.md resolve.md retry-all-errors.md retry-connrefused.md retry-delay.md retry-max-time.md retry.md sasl-authzid.md sasl-ir.md service-name.md show-error.md show-headers.md sigalgs.md silent.md skip-existing.md socks4.md socks4a.md socks5-basic.md socks5-gssapi-nec.md socks5-gssapi-service.md socks5-gssapi.md socks5-hostname.md socks5.md speed-limit.md speed-time.md ssl-allow-beast.md ssl-auto-client-cert.md ssl-no-revoke.md ssl-reqd.md ssl-revoke-best-effort.md ssl-sessions.md ssl.md sslv2.md sslv3.md stderr.md styled-output.md suppress-connect-headers.md tcp-fastopen.md tcp-nodelay.md telnet-option.md tftp-blksize.md tftp-no-options.md time-cond.md tls-earlydata.md tls-max.md tls13-ciphers.md tlsauthtype.md tlspassword.md tlsuser.md tlsv1.0.md tlsv1.1.md tlsv1.2.md tlsv1.3.md tlsv1.md tr-encoding.md trace-ascii.md trace-config.md trace-ids.md trace-time.md trace.md unix-socket.md upload-file.md upload-flags.md url-query.md url.md use-ascii.md user-agent.md user.md variable.md verbose.md version.md vlan-priority.md write-out.md xattr.mdexamples
.checksrc .gitignore 10-at-a-time.c CMakeLists.txt Makefile.am Makefile.example Makefile.inc README.md adddocsref.pl address-scope.c altsvc.c anyauthput.c block_ip.c cacertinmem.c certinfo.c chkspeed.c connect-to.c cookie_interface.c crawler.c debug.c default-scheme.c ephiperfifo.c evhiperfifo.c externalsocket.c fileupload.c ftp-delete.c ftp-wildcard.c ftpget.c ftpgetinfo.c ftpgetresp.c ftpsget.c ftpupload.c ftpuploadfrommem.c ftpuploadresume.c getinfo.c getinmemory.c getredirect.c getreferrer.c ghiper.c headerapi.c hiperfifo.c hsts-preload.c htmltidy.c htmltitle.cpp http-options.c http-post.c http2-download.c http2-pushinmemory.c http2-serverpush.c http2-upload.c http3-present.c http3.c httpcustomheader.c httpput-postfields.c httpput.c https.c imap-append.c imap-authzid.c imap-copy.c imap-create.c imap-delete.c imap-examine.c imap-fetch.c imap-list.c imap-lsub.c imap-multi.c imap-noop.c imap-search.c imap-ssl.c imap-store.c imap-tls.c interface.c ipv6.c keepalive.c localport.c log_failed_transfers.c maxconnects.c multi-app.c multi-debugcallback.c multi-double.c multi-event.c multi-formadd.c multi-legacy.c multi-post.c multi-single.c multi-uv.c netrc.c parseurl.c persistent.c pop3-authzid.c pop3-dele.c pop3-list.c pop3-multi.c pop3-noop.c pop3-retr.c pop3-ssl.c pop3-stat.c pop3-tls.c pop3-top.c pop3-uidl.c post-callback.c postinmemory.c postit2-formadd.c postit2.c progressfunc.c protofeats.c range.c resolve.c rtsp-options.c sendrecv.c sepheaders.c sessioninfo.c sftpget.c sftpuploadresume.c shared-connection-cache.c simple.c simplepost.c simplessl.c smooth-gtk-thread.c smtp-authzid.c smtp-expn.c smtp-mail.c smtp-mime.c smtp-multi.c smtp-ssl.c smtp-tls.c smtp-vrfy.c sslbackend.c synctime.c threaded.c unixsocket.c url2file.c urlapi.c usercertinmem.c version-check.pl websocket-cb.c websocket-updown.c websocket.c xmlstream.cinternals
BUFQ.md BUFREF.md CHECKSRC.md CLIENT-READERS.md CLIENT-WRITERS.md CODE_STYLE.md CONNECTION-FILTERS.md CREDENTIALS.md CURLX.md DYNBUF.md HASH.md LLIST.md MID.md MQTT.md MULTI-EV.md NEW-PROTOCOL.md PEERS.md PORTING.md RATELIMITS.md README.md SCORECARD.md SPLAY.md STRPARSE.md THRDPOOL-AND-QUEUE.md TIME-KEEPING.md TLS-SESSIONS.md UINT_SETS.md WEBSOCKET.mdlibcurl
opts
CMakeLists.txt CURLINFO_ACTIVESOCKET.md CURLINFO_APPCONNECT_TIME.md CURLINFO_APPCONNECT_TIME_T.md CURLINFO_CAINFO.md CURLINFO_CAPATH.md CURLINFO_CERTINFO.md CURLINFO_CONDITION_UNMET.md CURLINFO_CONNECT_TIME.md CURLINFO_CONNECT_TIME_T.md CURLINFO_CONN_ID.md CURLINFO_CONTENT_LENGTH_DOWNLOAD.md CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.md CURLINFO_CONTENT_LENGTH_UPLOAD.md CURLINFO_CONTENT_LENGTH_UPLOAD_T.md CURLINFO_CONTENT_TYPE.md CURLINFO_COOKIELIST.md CURLINFO_EARLYDATA_SENT_T.md CURLINFO_EFFECTIVE_METHOD.md CURLINFO_EFFECTIVE_URL.md CURLINFO_FILETIME.md CURLINFO_FILETIME_T.md CURLINFO_FTP_ENTRY_PATH.md CURLINFO_HEADER_SIZE.md CURLINFO_HTTPAUTH_AVAIL.md CURLINFO_HTTPAUTH_USED.md CURLINFO_HTTP_CONNECTCODE.md CURLINFO_HTTP_VERSION.md CURLINFO_LASTSOCKET.md CURLINFO_LOCAL_IP.md CURLINFO_LOCAL_PORT.md CURLINFO_NAMELOOKUP_TIME.md CURLINFO_NAMELOOKUP_TIME_T.md CURLINFO_NUM_CONNECTS.md CURLINFO_OS_ERRNO.md CURLINFO_POSTTRANSFER_TIME_T.md CURLINFO_PRETRANSFER_TIME.md CURLINFO_PRETRANSFER_TIME_T.md CURLINFO_PRIMARY_IP.md CURLINFO_PRIMARY_PORT.md CURLINFO_PRIVATE.md CURLINFO_PROTOCOL.md CURLINFO_PROXYAUTH_AVAIL.md CURLINFO_PROXYAUTH_USED.md CURLINFO_PROXY_ERROR.md CURLINFO_PROXY_SSL_VERIFYRESULT.md CURLINFO_QUEUE_TIME_T.md CURLINFO_REDIRECT_COUNT.md CURLINFO_REDIRECT_TIME.md CURLINFO_REDIRECT_TIME_T.md CURLINFO_REDIRECT_URL.md CURLINFO_REFERER.md CURLINFO_REQUEST_SIZE.md CURLINFO_RESPONSE_CODE.md CURLINFO_RETRY_AFTER.md CURLINFO_RTSP_CLIENT_CSEQ.md CURLINFO_RTSP_CSEQ_RECV.md CURLINFO_RTSP_SERVER_CSEQ.md CURLINFO_RTSP_SESSION_ID.md CURLINFO_SCHEME.md CURLINFO_SIZE_DELIVERED.md CURLINFO_SIZE_DOWNLOAD.md CURLINFO_SIZE_DOWNLOAD_T.md CURLINFO_SIZE_UPLOAD.md CURLINFO_SIZE_UPLOAD_T.md CURLINFO_SPEED_DOWNLOAD.md CURLINFO_SPEED_DOWNLOAD_T.md CURLINFO_SPEED_UPLOAD.md CURLINFO_SPEED_UPLOAD_T.md CURLINFO_SSL_ENGINES.md CURLINFO_SSL_VERIFYRESULT.md CURLINFO_STARTTRANSFER_TIME.md CURLINFO_STARTTRANSFER_TIME_T.md CURLINFO_TLS_SESSION.md CURLINFO_TLS_SSL_PTR.md CURLINFO_TOTAL_TIME.md CURLINFO_TOTAL_TIME_T.md CURLINFO_USED_PROXY.md CURLINFO_XFER_ID.md CURLMINFO_XFERS_ADDED.md CURLMINFO_XFERS_CURRENT.md CURLMINFO_XFERS_DONE.md CURLMINFO_XFERS_PENDING.md CURLMINFO_XFERS_RUNNING.md CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.md CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.md CURLMOPT_MAXCONNECTS.md CURLMOPT_MAX_CONCURRENT_STREAMS.md CURLMOPT_MAX_HOST_CONNECTIONS.md CURLMOPT_MAX_PIPELINE_LENGTH.md CURLMOPT_MAX_TOTAL_CONNECTIONS.md CURLMOPT_NETWORK_CHANGED.md CURLMOPT_NOTIFYDATA.md CURLMOPT_NOTIFYFUNCTION.md CURLMOPT_PIPELINING.md CURLMOPT_PIPELINING_SERVER_BL.md CURLMOPT_PIPELINING_SITE_BL.md CURLMOPT_PUSHDATA.md CURLMOPT_PUSHFUNCTION.md CURLMOPT_QUICK_EXIT.md CURLMOPT_RESOLVE_THREADS_MAX.md CURLMOPT_SOCKETDATA.md CURLMOPT_SOCKETFUNCTION.md CURLMOPT_TIMERDATA.md CURLMOPT_TIMERFUNCTION.md CURLOPT_ABSTRACT_UNIX_SOCKET.md CURLOPT_ACCEPTTIMEOUT_MS.md CURLOPT_ACCEPT_ENCODING.md CURLOPT_ADDRESS_SCOPE.md CURLOPT_ALTSVC.md CURLOPT_ALTSVC_CTRL.md CURLOPT_APPEND.md CURLOPT_AUTOREFERER.md CURLOPT_AWS_SIGV4.md CURLOPT_BUFFERSIZE.md CURLOPT_CAINFO.md CURLOPT_CAINFO_BLOB.md CURLOPT_CAPATH.md CURLOPT_CA_CACHE_TIMEOUT.md CURLOPT_CERTINFO.md CURLOPT_CHUNK_BGN_FUNCTION.md CURLOPT_CHUNK_DATA.md CURLOPT_CHUNK_END_FUNCTION.md CURLOPT_CLOSESOCKETDATA.md CURLOPT_CLOSESOCKETFUNCTION.md CURLOPT_CONNECTTIMEOUT.md CURLOPT_CONNECTTIMEOUT_MS.md CURLOPT_CONNECT_ONLY.md CURLOPT_CONNECT_TO.md CURLOPT_CONV_FROM_NETWORK_FUNCTION.md CURLOPT_CONV_FROM_UTF8_FUNCTION.md CURLOPT_CONV_TO_NETWORK_FUNCTION.md CURLOPT_COOKIE.md CURLOPT_COOKIEFILE.md CURLOPT_COOKIEJAR.md CURLOPT_COOKIELIST.md CURLOPT_COOKIESESSION.md CURLOPT_COPYPOSTFIELDS.md CURLOPT_CRLF.md CURLOPT_CRLFILE.md CURLOPT_CURLU.md CURLOPT_CUSTOMREQUEST.md CURLOPT_DEBUGDATA.md CURLOPT_DEBUGFUNCTION.md CURLOPT_DEFAULT_PROTOCOL.md CURLOPT_DIRLISTONLY.md CURLOPT_DISALLOW_USERNAME_IN_URL.md CURLOPT_DNS_CACHE_TIMEOUT.md CURLOPT_DNS_INTERFACE.md CURLOPT_DNS_LOCAL_IP4.md CURLOPT_DNS_LOCAL_IP6.md CURLOPT_DNS_SERVERS.md CURLOPT_DNS_SHUFFLE_ADDRESSES.md CURLOPT_DNS_USE_GLOBAL_CACHE.md CURLOPT_DOH_SSL_VERIFYHOST.md CURLOPT_DOH_SSL_VERIFYPEER.md CURLOPT_DOH_SSL_VERIFYSTATUS.md CURLOPT_DOH_URL.md CURLOPT_ECH.md CURLOPT_EGDSOCKET.md CURLOPT_ERRORBUFFER.md CURLOPT_EXPECT_100_TIMEOUT_MS.md CURLOPT_FAILONERROR.md CURLOPT_FILETIME.md CURLOPT_FNMATCH_DATA.md CURLOPT_FNMATCH_FUNCTION.md CURLOPT_FOLLOWLOCATION.md CURLOPT_FORBID_REUSE.md CURLOPT_FRESH_CONNECT.md CURLOPT_FTPPORT.md CURLOPT_FTPSSLAUTH.md CURLOPT_FTP_ACCOUNT.md CURLOPT_FTP_ALTERNATIVE_TO_USER.md CURLOPT_FTP_CREATE_MISSING_DIRS.md CURLOPT_FTP_FILEMETHOD.md CURLOPT_FTP_SKIP_PASV_IP.md CURLOPT_FTP_SSL_CCC.md CURLOPT_FTP_USE_EPRT.md CURLOPT_FTP_USE_EPSV.md CURLOPT_FTP_USE_PRET.md CURLOPT_GSSAPI_DELEGATION.md CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.md CURLOPT_HAPROXYPROTOCOL.md CURLOPT_HAPROXY_CLIENT_IP.md CURLOPT_HEADER.md CURLOPT_HEADERDATA.md CURLOPT_HEADERFUNCTION.md CURLOPT_HEADEROPT.md CURLOPT_HSTS.md CURLOPT_HSTSREADDATA.md CURLOPT_HSTSREADFUNCTION.md CURLOPT_HSTSWRITEDATA.md CURLOPT_HSTSWRITEFUNCTION.md CURLOPT_HSTS_CTRL.md CURLOPT_HTTP09_ALLOWED.md CURLOPT_HTTP200ALIASES.md CURLOPT_HTTPAUTH.md CURLOPT_HTTPGET.md CURLOPT_HTTPHEADER.md CURLOPT_HTTPPOST.md CURLOPT_HTTPPROXYTUNNEL.md CURLOPT_HTTP_CONTENT_DECODING.md CURLOPT_HTTP_TRANSFER_DECODING.md CURLOPT_HTTP_VERSION.md CURLOPT_IGNORE_CONTENT_LENGTH.md CURLOPT_INFILESIZE.md CURLOPT_INFILESIZE_LARGE.md CURLOPT_INTERFACE.md CURLOPT_INTERLEAVEDATA.md CURLOPT_INTERLEAVEFUNCTION.md CURLOPT_IOCTLDATA.md CURLOPT_IOCTLFUNCTION.md CURLOPT_IPRESOLVE.md CURLOPT_ISSUERCERT.md CURLOPT_ISSUERCERT_BLOB.md CURLOPT_KEEP_SENDING_ON_ERROR.md CURLOPT_KEYPASSWD.md CURLOPT_KRBLEVEL.md CURLOPT_LOCALPORT.md CURLOPT_LOCALPORTRANGE.md CURLOPT_LOGIN_OPTIONS.md CURLOPT_LOW_SPEED_LIMIT.md CURLOPT_LOW_SPEED_TIME.md CURLOPT_MAIL_AUTH.md CURLOPT_MAIL_FROM.md CURLOPT_MAIL_RCPT.md CURLOPT_MAIL_RCPT_ALLOWFAILS.md CURLOPT_MAXAGE_CONN.md CURLOPT_MAXCONNECTS.md CURLOPT_MAXFILESIZE.md CURLOPT_MAXFILESIZE_LARGE.md CURLOPT_MAXLIFETIME_CONN.md CURLOPT_MAXREDIRS.md CURLOPT_MAX_RECV_SPEED_LARGE.md CURLOPT_MAX_SEND_SPEED_LARGE.md CURLOPT_MIMEPOST.md CURLOPT_MIME_OPTIONS.md CURLOPT_NETRC.md CURLOPT_NETRC_FILE.md CURLOPT_NEW_DIRECTORY_PERMS.md CURLOPT_NEW_FILE_PERMS.md CURLOPT_NOBODY.md CURLOPT_NOPROGRESS.md CURLOPT_NOPROXY.md CURLOPT_NOSIGNAL.md CURLOPT_OPENSOCKETDATA.md CURLOPT_OPENSOCKETFUNCTION.md CURLOPT_PASSWORD.md CURLOPT_PATH_AS_IS.md CURLOPT_PINNEDPUBLICKEY.md CURLOPT_PIPEWAIT.md CURLOPT_PORT.md CURLOPT_POST.md CURLOPT_POSTFIELDS.md CURLOPT_POSTFIELDSIZE.md CURLOPT_POSTFIELDSIZE_LARGE.md CURLOPT_POSTQUOTE.md CURLOPT_POSTREDIR.md CURLOPT_PREQUOTE.md CURLOPT_PREREQDATA.md CURLOPT_PREREQFUNCTION.md CURLOPT_PRE_PROXY.md CURLOPT_PRIVATE.md CURLOPT_PROGRESSDATA.md CURLOPT_PROGRESSFUNCTION.md CURLOPT_PROTOCOLS.md CURLOPT_PROTOCOLS_STR.md CURLOPT_PROXY.md CURLOPT_PROXYAUTH.md CURLOPT_PROXYHEADER.md CURLOPT_PROXYPASSWORD.md CURLOPT_PROXYPORT.md CURLOPT_PROXYTYPE.md CURLOPT_PROXYUSERNAME.md CURLOPT_PROXYUSERPWD.md CURLOPT_PROXY_CAINFO.md CURLOPT_PROXY_CAINFO_BLOB.md CURLOPT_PROXY_CAPATH.md CURLOPT_PROXY_CRLFILE.md CURLOPT_PROXY_ISSUERCERT.md CURLOPT_PROXY_ISSUERCERT_BLOB.md CURLOPT_PROXY_KEYPASSWD.md CURLOPT_PROXY_PINNEDPUBLICKEY.md CURLOPT_PROXY_SERVICE_NAME.md CURLOPT_PROXY_SSLCERT.md CURLOPT_PROXY_SSLCERTTYPE.md CURLOPT_PROXY_SSLCERT_BLOB.md CURLOPT_PROXY_SSLKEY.md CURLOPT_PROXY_SSLKEYTYPE.md CURLOPT_PROXY_SSLKEY_BLOB.md CURLOPT_PROXY_SSLVERSION.md CURLOPT_PROXY_SSL_CIPHER_LIST.md CURLOPT_PROXY_SSL_OPTIONS.md CURLOPT_PROXY_SSL_VERIFYHOST.md CURLOPT_PROXY_SSL_VERIFYPEER.md CURLOPT_PROXY_TLS13_CIPHERS.md CURLOPT_PROXY_TLSAUTH_PASSWORD.md CURLOPT_PROXY_TLSAUTH_TYPE.md CURLOPT_PROXY_TLSAUTH_USERNAME.md CURLOPT_PROXY_TRANSFER_MODE.md CURLOPT_PUT.md CURLOPT_QUICK_EXIT.md CURLOPT_QUOTE.md CURLOPT_RANDOM_FILE.md CURLOPT_RANGE.md CURLOPT_READDATA.md CURLOPT_READFUNCTION.md CURLOPT_REDIR_PROTOCOLS.md CURLOPT_REDIR_PROTOCOLS_STR.md CURLOPT_REFERER.md CURLOPT_REQUEST_TARGET.md CURLOPT_RESOLVE.md CURLOPT_RESOLVER_START_DATA.md CURLOPT_RESOLVER_START_FUNCTION.md CURLOPT_RESUME_FROM.md CURLOPT_RESUME_FROM_LARGE.md CURLOPT_RTSP_CLIENT_CSEQ.md CURLOPT_RTSP_REQUEST.md CURLOPT_RTSP_SERVER_CSEQ.md CURLOPT_RTSP_SESSION_ID.md CURLOPT_RTSP_STREAM_URI.md CURLOPT_RTSP_TRANSPORT.md CURLOPT_SASL_AUTHZID.md CURLOPT_SASL_IR.md CURLOPT_SEEKDATA.md CURLOPT_SEEKFUNCTION.md CURLOPT_SERVER_RESPONSE_TIMEOUT.md CURLOPT_SERVER_RESPONSE_TIMEOUT_MS.md CURLOPT_SERVICE_NAME.md CURLOPT_SHARE.md CURLOPT_SOCKOPTDATA.md CURLOPT_SOCKOPTFUNCTION.md CURLOPT_SOCKS5_AUTH.md CURLOPT_SOCKS5_GSSAPI_NEC.md CURLOPT_SOCKS5_GSSAPI_SERVICE.md CURLOPT_SSH_AUTH_TYPES.md CURLOPT_SSH_COMPRESSION.md CURLOPT_SSH_HOSTKEYDATA.md CURLOPT_SSH_HOSTKEYFUNCTION.md CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.md CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256.md CURLOPT_SSH_KEYDATA.md CURLOPT_SSH_KEYFUNCTION.md CURLOPT_SSH_KNOWNHOSTS.md CURLOPT_SSH_PRIVATE_KEYFILE.md CURLOPT_SSH_PUBLIC_KEYFILE.md CURLOPT_SSLCERT.md CURLOPT_SSLCERTTYPE.md CURLOPT_SSLCERT_BLOB.md CURLOPT_SSLENGINE.md CURLOPT_SSLENGINE_DEFAULT.md CURLOPT_SSLKEY.md CURLOPT_SSLKEYTYPE.md CURLOPT_SSLKEY_BLOB.md CURLOPT_SSLVERSION.md CURLOPT_SSL_CIPHER_LIST.md CURLOPT_SSL_CTX_DATA.md CURLOPT_SSL_CTX_FUNCTION.md CURLOPT_SSL_EC_CURVES.md CURLOPT_SSL_ENABLE_ALPN.md CURLOPT_SSL_ENABLE_NPN.md CURLOPT_SSL_FALSESTART.md CURLOPT_SSL_OPTIONS.md CURLOPT_SSL_SESSIONID_CACHE.md CURLOPT_SSL_SIGNATURE_ALGORITHMS.md CURLOPT_SSL_VERIFYHOST.md CURLOPT_SSL_VERIFYPEER.md CURLOPT_SSL_VERIFYSTATUS.md CURLOPT_STDERR.md CURLOPT_STREAM_DEPENDS.md CURLOPT_STREAM_DEPENDS_E.md CURLOPT_STREAM_WEIGHT.md CURLOPT_SUPPRESS_CONNECT_HEADERS.md CURLOPT_TCP_FASTOPEN.md CURLOPT_TCP_KEEPALIVE.md CURLOPT_TCP_KEEPCNT.md CURLOPT_TCP_KEEPIDLE.md CURLOPT_TCP_KEEPINTVL.md CURLOPT_TCP_NODELAY.md CURLOPT_TELNETOPTIONS.md CURLOPT_TFTP_BLKSIZE.md CURLOPT_TFTP_NO_OPTIONS.md CURLOPT_TIMECONDITION.md CURLOPT_TIMEOUT.md CURLOPT_TIMEOUT_MS.md CURLOPT_TIMEVALUE.md CURLOPT_TIMEVALUE_LARGE.md CURLOPT_TLS13_CIPHERS.md CURLOPT_TLSAUTH_PASSWORD.md CURLOPT_TLSAUTH_TYPE.md CURLOPT_TLSAUTH_USERNAME.md CURLOPT_TRAILERDATA.md CURLOPT_TRAILERFUNCTION.md CURLOPT_TRANSFERTEXT.md CURLOPT_TRANSFER_ENCODING.md CURLOPT_UNIX_SOCKET_PATH.md CURLOPT_UNRESTRICTED_AUTH.md CURLOPT_UPKEEP_INTERVAL_MS.md CURLOPT_UPLOAD.md CURLOPT_UPLOAD_BUFFERSIZE.md CURLOPT_UPLOAD_FLAGS.md CURLOPT_URL.md CURLOPT_USERAGENT.md CURLOPT_USERNAME.md CURLOPT_USERPWD.md CURLOPT_USE_SSL.md CURLOPT_VERBOSE.md CURLOPT_WILDCARDMATCH.md CURLOPT_WRITEDATA.md CURLOPT_WRITEFUNCTION.md CURLOPT_WS_OPTIONS.md CURLOPT_XFERINFODATA.md CURLOPT_XFERINFOFUNCTION.md CURLOPT_XOAUTH2_BEARER.md CURLSHOPT_LOCKFUNC.md CURLSHOPT_SHARE.md CURLSHOPT_UNLOCKFUNC.md CURLSHOPT_UNSHARE.md CURLSHOPT_USERDATA.md Makefile.am Makefile.incinclude
curl
Makefile.am curl.h curlver.h easy.h header.h mprintf.h multi.h options.h stdcheaders.h system.h typecheck-gcc.h urlapi.h websockets.hlib
curlx
base64.c base64.h basename.c basename.h dynbuf.c dynbuf.h fopen.c fopen.h inet_ntop.c inet_ntop.h inet_pton.c inet_pton.h multibyte.c multibyte.h nonblock.c nonblock.h snprintf.c snprintf.h strcopy.c strcopy.h strdup.c strdup.h strerr.c strerr.h strparse.c strparse.h timediff.c timediff.h timeval.c timeval.h version_win32.c version_win32.h wait.c wait.h warnless.c warnless.h winapi.c winapi.hvauth
cleartext.c cram.c digest.c digest.h digest_sspi.c gsasl.c krb5_gssapi.c krb5_sspi.c ntlm.c ntlm_sspi.c oauth2.c spnego_gssapi.c spnego_sspi.c vauth.c vauth.hvquic
curl_ngtcp2.c curl_ngtcp2.h curl_quiche.c curl_quiche.h vquic-tls.c vquic-tls.h vquic.c vquic.h vquic_int.hvtls
apple.c apple.h cipher_suite.c cipher_suite.h gtls.c gtls.h hostcheck.c hostcheck.h keylog.c keylog.h mbedtls.c mbedtls.h openssl.c openssl.h rustls.c rustls.h schannel.c schannel.h schannel_int.h schannel_verify.c vtls.c vtls.h vtls_int.h vtls_scache.c vtls_scache.h vtls_spack.c vtls_spack.h wolfssl.c wolfssl.h x509asn1.c x509asn1.hm4
.gitignore curl-amissl.m4 curl-apple-sectrust.m4 curl-compilers.m4 curl-confopts.m4 curl-functions.m4 curl-gnutls.m4 curl-mbedtls.m4 curl-openssl.m4 curl-override.m4 curl-reentrant.m4 curl-rustls.m4 curl-schannel.m4 curl-sysconfig.m4 curl-wolfssl.m4 xc-am-iface.m4 xc-cc-check.m4 xc-lt-iface.m4 xc-val-flgs.m4 zz40-xc-ovr.m4 zz50-xc-ovr.m4projects
OS400
.checksrc README.OS400 ccsidcurl.c ccsidcurl.h config400.default curl.cmd curl.inc.in curlcl.c curlmain.c initscript.sh make-docs.sh make-include.sh make-lib.sh make-src.sh make-tests.sh makefile.sh os400sys.c os400sys.hWindows
tmpl
.gitattributes README.txt curl-all.sln curl.sln curl.vcxproj curl.vcxproj.filters libcurl.sln libcurl.vcxproj libcurl.vcxproj.filtersvms
Makefile.am backup_gnv_curl_src.com build_curl-config_script.com build_gnv_curl.com build_gnv_curl_pcsi_desc.com build_gnv_curl_pcsi_text.com build_gnv_curl_release_notes.com build_libcurl_pc.com build_vms.com clean_gnv_curl.com compare_curl_source.com config_h.com curl_crtl_init.c curl_gnv_build_steps.txt curl_release_note_start.txt curl_startup.com curlmsg.h curlmsg.msg curlmsg.sdl curlmsg_vms.h generate_config_vms_h_curl.com generate_vax_transfer.com gnv_conftest.c_first gnv_curl_configure.sh gnv_libcurl_symbols.opt gnv_link_curl.com macro32_exactcase.patch make_gnv_curl_install.sh make_pcsi_curl_kit_name.com pcsi_gnv_curl_file_list.txt pcsi_product_gnv_curl.com readme report_openssl_version.c setup_gnv_curl_build.com stage_curl_install.com vms_eco_level.hscripts
.checksrc CMakeLists.txt Makefile.am badwords badwords-all badwords.txt cd2cd cd2nroff cdall checksrc-all.pl checksrc.pl cmakelint.sh completion.pl contributors.sh contrithanks.sh coverage.sh delta dmaketgz extract-unit-protos firefox-db2pem.sh installcheck.sh maketgz managen mdlinkcheck mk-ca-bundle.pl mk-unity.pl nroff2cd perlcheck.sh pythonlint.sh randdisable release-notes.pl release-tools.sh schemetable.c singleuse.pl spacecheck.pl top-complexity top-length verify-release wcurlsrc
.checksrc .gitignore CMakeLists.txt Makefile.am Makefile.inc config2setopts.c config2setopts.h curl.rc curlinfo.c mk-file-embed.pl mkhelp.pl slist_wc.c slist_wc.h terminal.c terminal.h tool_cb_dbg.c tool_cb_dbg.h tool_cb_hdr.c tool_cb_hdr.h tool_cb_prg.c tool_cb_prg.h tool_cb_rea.c tool_cb_rea.h tool_cb_see.c tool_cb_see.h tool_cb_soc.c tool_cb_soc.h tool_cb_wrt.c tool_cb_wrt.h tool_cfgable.c tool_cfgable.h tool_dirhie.c tool_dirhie.h tool_doswin.c tool_doswin.h tool_easysrc.c tool_easysrc.h tool_filetime.c tool_filetime.h tool_findfile.c tool_findfile.h tool_formparse.c tool_formparse.h tool_getparam.c tool_getparam.h tool_getpass.c tool_getpass.h tool_help.c tool_help.h tool_helpers.c tool_helpers.h tool_hugehelp.h tool_ipfs.c tool_ipfs.h tool_libinfo.c tool_libinfo.h tool_listhelp.c tool_main.c tool_main.h tool_msgs.c tool_msgs.h tool_operate.c tool_operate.h tool_operhlp.c tool_operhlp.h tool_paramhlp.c tool_paramhlp.h tool_parsecfg.c tool_parsecfg.h tool_progress.c tool_progress.h tool_sdecls.h tool_setopt.c tool_setopt.h tool_setup.h tool_ssls.c tool_ssls.h tool_stderr.c tool_stderr.h tool_urlglob.c tool_urlglob.h tool_util.c tool_util.h tool_version.h tool_vms.c tool_vms.h tool_writeout.c tool_writeout.h tool_writeout_json.c tool_writeout_json.h tool_xattr.c tool_xattr.h var.c var.htests
certs
.gitignore CMakeLists.txt Makefile.am Makefile.inc genserv.pl srp-verifier-conf srp-verifier-db test-ca.cnf test-ca.prm test-client-cert.prm test-client-eku-only.prm test-localhost-san-first.prm test-localhost-san-last.prm test-localhost.nn.prm test-localhost.prm test-localhost0h.prmdata
.gitignore DISABLED Makefile.am data-xml1 data1400.c data1401.c data1402.c data1403.c data1404.c data1405.c data1406.c data1407.c data1420.c data1461.txt data1463.txt data1465.c data1481.c data1705-1.md data1705-2.md data1705-3.md data1705-4.md data1705-stdout.1 data1706-1.md data1706-2.md data1706-3.md data1706-4.md data1706-stdout.txt data320.html test1 test10 test100 test1000 test1001 test1002 test1003 test1004 test1005 test1006 test1007 test1008 test1009 test101 test1010 test1011 test1012 test1013 test1014 test1015 test1016 test1017 test1018 test1019 test102 test1020 test1021 test1022 test1023 test1024 test1025 test1026 test1027 test1028 test1029 test103 test1030 test1031 test1032 test1033 test1034 test1035 test1036 test1037 test1038 test1039 test104 test1040 test1041 test1042 test1043 test1044 test1045 test1046 test1047 test1048 test1049 test105 test1050 test1051 test1052 test1053 test1054 test1055 test1056 test1057 test1058 test1059 test106 test1060 test1061 test1062 test1063 test1064 test1065 test1066 test1067 test1068 test1069 test107 test1070 test1071 test1072 test1073 test1074 test1075 test1076 test1077 test1078 test1079 test108 test1080 test1081 test1082 test1083 test1084 test1085 test1086 test1087 test1088 test1089 test109 test1090 test1091 test1092 test1093 test1094 test1095 test1096 test1097 test1098 test1099 test11 test110 test1100 test1101 test1102 test1103 test1104 test1105 test1106 test1107 test1108 test1109 test111 test1110 test1111 test1112 test1113 test1114 test1115 test1116 test1117 test1118 test1119 test112 test1120 test1121 test1122 test1123 test1124 test1125 test1126 test1127 test1128 test1129 test113 test1130 test1131 test1132 test1133 test1134 test1135 test1136 test1137 test1138 test1139 test114 test1140 test1141 test1142 test1143 test1144 test1145 test1146 test1147 test1148 test1149 test115 test1150 test1151 test1152 test1153 test1154 test1155 test1156 test1157 test1158 test1159 test116 test1160 test1161 test1162 test1163 test1164 test1165 test1166 test1167 test1168 test1169 test117 test1170 test1171 test1172 test1173 test1174 test1175 test1176 test1177 test1178 test1179 test118 test1180 test1181 test1182 test1183 test1184 test1185 test1186 test1187 test1188 test1189 test119 test1190 test1191 test1192 test1193 test1194 test1195 test1196 test1197 test1198 test1199 test12 test120 test1200 test1201 test1202 test1203 test1204 test1205 test1206 test1207 test1208 test1209 test121 test1210 test1211 test1212 test1213 test1214 test1215 test1216 test1217 test1218 test1219 test122 test1220 test1221 test1222 test1223 test1224 test1225 test1226 test1227 test1228 test1229 test123 test1230 test1231 test1232 test1233 test1234 test1235 test1236 test1237 test1238 test1239 test124 test1240 test1241 test1242 test1243 test1244 test1245 test1246 test1247 test1248 test1249 test125 test1250 test1251 test1252 test1253 test1254 test1255 test1256 test1257 test1258 test1259 test126 test1260 test1261 test1262 test1263 test1264 test1265 test1266 test1267 test1268 test1269 test127 test1270 test1271 test1272 test1273 test1274 test1275 test1276 test1277 test1278 test1279 test128 test1280 test1281 test1282 test1283 test1284 test1285 test1286 test1287 test1288 test1289 test129 test1290 test1291 test1292 test1293 test1294 test1295 test1296 test1297 test1298 test1299 test13 test130 test1300 test1301 test1302 test1303 test1304 test1305 test1306 test1307 test1308 test1309 test131 test1310 test1311 test1312 test1313 test1314 test1315 test1316 test1317 test1318 test1319 test132 test1320 test1321 test1322 test1323 test1324 test1325 test1326 test1327 test1328 test1329 test133 test1330 test1331 test1332 test1333 test1334 test1335 test1336 test1337 test1338 test1339 test134 test1340 test1341 test1342 test1343 test1344 test1345 test1346 test1347 test1348 test1349 test135 test1350 test1351 test1352 test1353 test1354 test1355 test1356 test1357 test1358 test1359 test136 test1360 test1361 test1362 test1363 test1364 test1365 test1366 test1367 test1368 test1369 test137 test1370 test1371 test1372 test1373 test1374 test1375 test1376 test1377 test1378 test1379 test138 test1380 test1381 test1382 test1383 test1384 test1385 test1386 test1387 test1388 test1389 test139 test1390 test1391 test1392 test1393 test1394 test1395 test1396 test1397 test1398 test1399 test14 test140 test1400 test1401 test1402 test1403 test1404 test1405 test1406 test1407 test1408 test1409 test141 test1410 test1411 test1412 test1413 test1414 test1415 test1416 test1417 test1418 test1419 test142 test1420 test1421 test1422 test1423 test1424 test1425 test1426 test1427 test1428 test1429 test143 test1430 test1431 test1432 test1433 test1434 test1435 test1436 test1437 test1438 test1439 test144 test1440 test1441 test1442 test1443 test1444 test1445 test1446 test1447 test1448 test1449 test145 test1450 test1451 test1452 test1453 test1454 test1455 test1456 test1457 test1458 test1459 test146 test1460 test1461 test1462 test1463 test1464 test1465 test1466 test1467 test1468 test1469 test147 test1470 test1471 test1472 test1473 test1474 test1475 test1476 test1477 test1478 test1479 test148 test1480 test1481 test1482 test1483 test1484 test1485 test1486 test1487 test1488 test1489 test149 test1490 test1491 test1492 test1493 test1494 test1495 test1496 test1497 test1498 test1499 test15 test150 test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1507 test1508 test1509 test151 test1510 test1511 test1512 test1513 test1514 test1515 test1516 test1517 test1518 test1519 test152 test1520 test1521 test1522 test1523 test1524 test1525 test1526 test1527 test1528 test1529 test153 test1530 test1531 test1532 test1533 test1534 test1535 test1536 test1537 test1538 test1539 test154 test1540 test1541 test1542 test1543 test1544 test1545 test1546 test1547 test1548 test1549 test155 test1550 test1551 test1552 test1553 test1554 test1555 test1556 test1557 test1558 test1559 test156 test1560 test1561 test1562 test1563 test1564 test1565 test1566 test1567 test1568 test1569 test157 test1570 test1571 test1572 test1573 test1574 test1575 test1576 test1577 test1578 test1579 test158 test1580 test1581 test1582 test1583 test1584 test1585 test1586 test1587 test1588 test1589 test159 test1590 test1591 test1592 test1593 test1594 test1595 test1596 test1597 test1598 test1599 test16 test160 test1600 test1601 test1602 test1603 test1604 test1605 test1606 test1607 test1608 test1609 test161 test1610 test1611 test1612 test1613 test1614 test1615 test1616 test1617 test1618 test1619 test162 test1620 test1621 test1622 test1623 test1624 test1625 test1626 test1627 test1628 test1629 test163 test1630 test1631 test1632 test1633 test1634 test1635 test1636 test1637 test1638 test1639 test164 test1640 test1641 test1642 test1643 test1644 test1645 test165 test1650 test1651 test1652 test1653 test1654 test1655 test1656 test1657 test1658 test1659 test166 test1660 test1661 test1662 test1663 test1664 test1665 test1666 test1667 test1668 test1669 test167 test1670 test1671 test1672 test1673 test1674 test1675 test1676 test168 test1680 test1681 test1682 test1683 test1684 test1685 test169 test17 test170 test1700 test1701 test1702 test1703 test1704 test1705 test1706 test1707 test1708 test1709 test171 test1710 test1711 test1712 test1713 test1714 test1715 test172 test1720 test1721 test173 test174 test175 test176 test177 test178 test179 test18 test180 test1800 test1801 test1802 test181 test182 test183 test184 test1847 test1848 test1849 test185 test1850 test1851 test186 test187 test188 test189 test19 test190 test1900 test1901 test1902 test1903 test1904 test1905 test1906 test1907 test1908 test1909 test191 test1910 test1911 test1912 test1913 test1914 test1915 test1916 test1917 test1918 test1919 test192 test1920 test1921 test193 test1933 test1934 test1935 test1936 test1937 test1938 test1939 test194 test1940 test1941 test1942 test1943 test1944 test1945 test1946 test1947 test1948 test195 test1955 test1956 test1957 test1958 test1959 test196 test1960 test1964 test1965 test1966 test197 test1970 test1971 test1972 test1973 test1974 test1975 test1976 test1977 test1978 test1979 test198 test1980 test1981 test1982 test1983 test1984 test199 test2 test20 test200 test2000 test2001 test2002 test2003 test2004 test2005 test2006 test2007 test2008 test2009 test201 test2010 test2011 test2012 test2013 test2014 test202 test2023 test2024 test2025 test2026 test2027 test2028 test2029 test203 test2030 test2031 test2032 test2033 test2034 test2035 test2037 test2038 test2039 test204 test2040 test2041 test2042 test2043 test2044 test2045 test2046 test2047 test2048 test2049 test205 test2050 test2051 test2052 test2053 test2054 test2055 test2056 test2057 test2058 test2059 test206 test2060 test2061 test2062 test2063 test2064 test2065 test2066 test2067 test2068 test2069 test207 test2070 test2071 test2072 test2073 test2074 test2075 test2076 test2077 test2078 test2079 test208 test2080 test2081 test2082 test2083 test2084 test2085 test2086 test2087 test2088 test2089 test209 test2090 test2091 test2092 test21 test210 test2100 test2101 test2102 test2103 test2104 test211 test212 test213 test214 test215 test216 test217 test218 test219 test22 test220 test2200 test2201 test2202 test2203 test2204 test2205 test2206 test2207 test221 test222 test223 test224 test225 test226 test227 test228 test229 test23 test230 test2300 test2301 test2302 test2303 test2304 test2306 test2307 test2308 test2309 test231 test232 test233 test234 test235 test236 test237 test238 test239 test24 test240 test2400 test2401 test2402 test2403 test2404 test2405 test2406 test2407 test2408 test2409 test241 test2410 test2411 test242 test243 test244 test245 test246 test247 test248 test249 test25 test250 test2500 test2501 test2502 test2503 test2504 test2505 test2506 test251 test252 test253 test254 test255 test256 test257 test258 test259 test26 test260 test2600 test2601 test2602 test2603 test2604 test2605 test261 test262 test263 test264 test265 test266 test267 test268 test269 test27 test270 test2700 test2701 test2702 test2703 test2704 test2705 test2706 test2707 test2708 test2709 test271 test2710 test2711 test2712 test2713 test2714 test2715 test2716 test2717 test2718 test2719 test272 test2720 test2721 test2722 test2723 test273 test274 test275 test276 test277 test278 test279 test28 test280 test281 test282 test283 test284 test285 test286 test287 test288 test289 test29 test290 test291 test292 test293 test294 test295 test296 test297 test298 test299 test3 test30 test300 test3000 test3001 test3002 test3003 test3004 test3005 test3006 test3007 test3008 test3009 test301 test3010 test3011 test3012 test3013 test3014 test3015 test3016 test3017 test3018 test3019 test302 test3020 test3021 test3022 test3023 test3024 test3025 test3026 test3027 test3028 test3029 test303 test3030 test3031 test3032 test3033 test3034 test3035 test3036 test304 test305 test306 test307 test308 test309 test31 test310 test3100 test3101 test3102 test3103 test3104 test3105 test3106 test311 test312 test313 test314 test315 test316 test317 test318 test319 test32 test320 test3200 test3201 test3202 test3203 test3204 test3205 test3206 test3207 test3208 test3209 test321 test3210 test3211 test3212 test3213 test3214 test3215 test3216 test3217 test3218 test3219 test322 test3220 test323 test324 test325 test326 test327 test328 test329 test33 test330 test3300 test3301 test3302 test331 test332 test333 test334 test335 test336 test337 test338 test339 test34 test340 test341 test342 test343 test344 test345 test346 test347 test348 test349 test35 test350 test351 test352 test353 test354 test355 test356 test357 test358 test359 test36 test360 test361 test362 test363 test364 test365 test366 test367 test368 test369 test37 test370 test371 test372 test373 test374 test375 test376 test378 test379 test38 test380 test381 test383 test384 test385 test386 test387 test388 test389 test39 test390 test391 test392 test393 test394 test395 test396 test397 test398 test399 test4 test40 test400 test4000 test4001 test401 test402 test403 test404 test405 test406 test407 test408 test409 test41 test410 test411 test412 test413 test414 test415 test416 test417 test418 test419 test42 test420 test421 test422 test423 test424 test425 test426 test427 test428 test429 test43 test430 test431 test432 test433 test434 test435 test436 test437 test438 test439 test44 test440 test441 test442 test443 test444 test445 test446 test447 test448 test449 test45 test450 test451 test452 test453 test454 test455 test456 test457 test458 test459 test46 test460 test461 test462 test463 test467 test468 test469 test47 test470 test471 test472 test473 test474 test475 test476 test477 test478 test479 test48 test480 test481 test482 test483 test484 test485 test486 test487 test488 test489 test49 test490 test491 test492 test493 test494 test495 test496 test497 test498 test499 test5 test50 test500 test501 test502 test503 test504 test505 test506 test507 test508 test509 test51 test510 test511 test512 test513 test514 test515 test516 test517 test518 test519 test52 test520 test521 test522 test523 test524 test525 test526 test527 test528 test529 test53 test530 test531 test532 test533 test534 test535 test536 test537 test538 test539 test54 test540 test541 test542 test543 test544 test545 test546 test547 test548 test549 test55 test550 test551 test552 test553 test554 test555 test556 test557 test558 test559 test56 test560 test561 test562 test563 test564 test565 test566 test567 test568 test569 test57 test570 test571 test572 test573 test574 test575 test576 test577 test578 test579 test58 test580 test581 test582 test583 test584 test585 test586 test587 test588 test589 test59 test590 test591 test592 test593 test594 test595 test596 test597 test598 test599 test6 test60 test600 test601 test602 test603 test604 test605 test606 test607 test608 test609 test61 test610 test611 test612 test613 test614 test615 test616 test617 test618 test619 test62 test620 test621 test622 test623 test624 test625 test626 test627 test628 test629 test63 test630 test631 test632 test633 test634 test635 test636 test637 test638 test639 test64 test640 test641 test642 test643 test644 test645 test646 test647 test648 test649 test65 test650 test651 test652 test653 test654 test655 test656 test658 test659 test66 test660 test661 test662 test663 test664 test665 test666 test667 test668 test669 test67 test670 test671 test672 test673 test674 test675 test676 test677 test678 test679 test68 test680 test681 test682 test683 test684 test685 test686 test687 test688 test689 test69 test690 test691 test692 test693 test694 test695 test696 test697 test698 test699 test7 test70 test700 test701 test702 test703 test704 test705 test706 test707 test708 test709 test71 test710 test711 test712 test713 test714 test715 test716 test717 test718 test719 test72 test720 test721 test722 test723 test724 test725 test726 test727 test728 test729 test73 test730 test731 test732 test733 test734 test735 test736 test737 test738 test739 test74 test740 test741 test742 test743 test744 test745 test746 test747 test748 test749 test75 test750 test751 test752 test753 test754 test755 test756 test757 test758 test759 test76 test760 test761 test762 test763 test764 test765 test766 test767 test768 test769 test77 test770 test771 test772 test773 test774 test775 test776 test777 test778 test779 test78 test780 test781 test782 test783 test784 test785 test786 test787 test788 test789 test79 test790 test791 test792 test793 test794 test795 test796 test797 test798 test799 test8 test80 test800 test801 test802 test803 test804 test805 test806 test807 test808 test809 test81 test810 test811 test812 test813 test814 test815 test816 test817 test818 test819 test82 test820 test821 test822 test823 test824 test825 test826 test827 test828 test829 test83 test830 test831 test832 test833 test834 test835 test836 test837 test838 test839 test84 test840 test841 test842 test843 test844 test845 test846 test847 test848 test849 test85 test850 test851 test852 test853 test854 test855 test856 test857 test858 test859 test86 test860 test861 test862 test863 test864 test865 test866 test867 test868 test869 test87 test870 test871 test872 test873 test874 test875 test876 test877 test878 test879 test88 test880 test881 test882 test883 test884 test885 test886 test887 test888 test889 test89 test890 test891 test892 test893 test894 test895 test896 test897 test898 test899 test9 test90 test900 test901 test902 test903 test904 test905 test906 test907 test908 test909 test91 test910 test911 test912 test913 test914 test915 test916 test917 test918 test919 test92 test920 test921 test922 test923 test924 test925 test926 test927 test928 test929 test93 test930 test931 test932 test933 test934 test935 test936 test937 test938 test939 test94 test940 test941 test942 test943 test944 test945 test946 test947 test948 test949 test95 test950 test951 test952 test953 test954 test955 test956 test957 test958 test959 test96 test960 test961 test962 test963 test964 test965 test966 test967 test968 test969 test97 test970 test971 test972 test973 test974 test975 test976 test977 test978 test979 test98 test980 test981 test982 test983 test984 test985 test986 test987 test988 test989 test99 test990 test991 test992 test993 test994 test995 test996 test997 test998 test999http
testenv
__init__.py caddy.py certs.py client.py curl.py dante.py dnsd.py env.py httpd.py nghttpx.py ports.py sshd.py vsftpd.py ws_echo_server.pylibtest
.gitignore CMakeLists.txt Makefile.am Makefile.inc cli_ftp_upload.c cli_h2_pausing.c cli_h2_serverpush.c cli_h2_upgrade_extreme.c cli_hx_download.c cli_hx_upload.c cli_tls_session_reuse.c cli_upload_pausing.c cli_ws_data.c cli_ws_pingpong.c first.c first.h lib1156.c lib1301.c lib1308.c lib1485.c lib1500.c lib1501.c lib1502.c lib1506.c lib1507.c lib1508.c lib1509.c lib1510.c lib1511.c lib1512.c lib1513.c lib1514.c lib1515.c lib1517.c lib1518.c lib1520.c lib1522.c lib1523.c lib1525.c lib1526.c lib1527.c lib1528.c lib1529.c lib1530.c lib1531.c lib1532.c lib1533.c lib1534.c lib1535.c lib1536.c lib1537.c lib1538.c lib1540.c lib1541.c lib1542.c lib1545.c lib1549.c lib1550.c lib1551.c lib1552.c lib1553.c lib1554.c lib1555.c lib1556.c lib1557.c lib1558.c lib1559.c lib1560.c lib1564.c lib1565.c lib1567.c lib1568.c lib1569.c lib1571.c lib1576.c lib1582.c lib1587.c lib1588.c lib1589.c lib1591.c lib1592.c lib1593.c lib1594.c lib1597.c lib1598.c lib1599.c lib1662.c lib1900.c lib1901.c lib1902.c lib1903.c lib1905.c lib1906.c lib1907.c lib1908.c lib1910.c lib1911.c lib1912.c lib1913.c lib1915.c lib1916.c lib1918.c lib1919.c lib1920.c lib1921.c lib1933.c lib1934.c lib1935.c lib1936.c lib1937.c lib1938.c lib1939.c lib1940.c lib1945.c lib1947.c lib1948.c lib1955.c lib1956.c lib1957.c lib1958.c lib1959.c lib1960.c lib1964.c lib1965.c lib1970.c lib1971.c lib1972.c lib1973.c lib1974.c lib1975.c lib1977.c lib1978.c lib2023.c lib2032.c lib2082.c lib2301.c lib2302.c lib2304.c lib2306.c lib2308.c lib2309.c lib2402.c lib2404.c lib2405.c lib2502.c lib2504.c lib2505.c lib2506.c lib2700.c lib3010.c lib3025.c lib3026.c lib3027.c lib3033.c lib3034.c lib3100.c lib3101.c lib3102.c lib3103.c lib3104.c lib3105.c lib3207.c lib3208.c lib500.c lib501.c lib502.c lib503.c lib504.c lib505.c lib506.c lib507.c lib508.c lib509.c lib510.c lib511.c lib512.c lib513.c lib514.c lib515.c lib516.c lib517.c lib518.c lib519.c lib520.c lib521.c lib523.c lib524.c lib525.c lib526.c lib530.c lib533.c lib536.c lib537.c lib539.c lib540.c lib541.c lib542.c lib543.c lib544.c lib547.c lib549.c lib552.c lib553.c lib554.c lib555.c lib556.c lib557.c lib558.c lib559.c lib560.c lib562.c lib564.c lib566.c lib567.c lib568.c lib569.c lib570.c lib571.c lib572.c lib573.c lib574.c lib575.c lib576.c lib578.c lib579.c lib582.c lib583.c lib586.c lib589.c lib590.c lib591.c lib597.c lib598.c lib599.c lib643.c lib650.c lib651.c lib652.c lib653.c lib654.c lib655.c lib658.c lib659.c lib661.c lib666.c lib667.c lib668.c lib670.c lib674.c lib676.c lib677.c lib678.c lib694.c lib695.c lib751.c lib753.c lib757.c lib758.c lib766.c memptr.c mk-lib1521.pl test1013.pl test1022.pl test307.pl test610.pl test613.pl testtrace.c testtrace.h testutil.c testutil.h unitcheck.hserver
.checksrc .gitignore CMakeLists.txt Makefile.am Makefile.inc dnsd.c first.c first.h getpart.c mqttd.c resolve.c rtspd.c sockfilt.c socksd.c sws.c tftpd.c util.ctunit
.gitignore CMakeLists.txt Makefile.am Makefile.inc README.md tool1394.c tool1604.c tool1621.c tool1622.c tool1623.c tool1720.cunit
.gitignore CMakeLists.txt Makefile.am Makefile.inc README.md unit1300.c unit1302.c unit1303.c unit1304.c unit1305.c unit1307.c unit1309.c unit1323.c unit1330.c unit1395.c unit1396.c unit1397.c unit1398.c unit1399.c unit1600.c unit1601.c unit1602.c unit1603.c unit1605.c unit1606.c unit1607.c unit1608.c unit1609.c unit1610.c unit1611.c unit1612.c unit1614.c unit1615.c unit1616.c unit1620.c unit1625.c unit1626.c unit1627.c unit1636.c unit1650.c unit1651.c unit1652.c unit1653.c unit1654.c unit1655.c unit1656.c unit1657.c unit1658.c unit1660.c unit1661.c unit1663.c unit1664.c unit1666.c unit1667.c unit1668.c unit1669.c unit1674.c unit1675.c unit1676.c unit1979.c unit1980.c unit2600.c unit2601.c unit2602.c unit2603.c unit2604.c unit2605.c unit3200.c unit3205.c unit3211.c unit3212.c unit3213.c unit3214.c unit3216.c unit3219.c unit3300.c unit3301.c unit3302.cexamples
.env config.ini crypto_test.lua env_test.lua fs_example.lua http_server.lua https_test.lua ini_example.lua json.lua log.lua path_fs_example.lua process_example.lua request_download.lua request_test.lua run_all.lua sqlite_example.lua sqlite_http_template.lua stash_test.lua template_test.lua timer.lua websocket.luainiparser
example
iniexample.c iniwrite.c parse.c twisted-errors.ini twisted-genhuge.py twisted-ofkey.ini twisted-ofval.ini twisted.initest
CMakeLists.txt test_dictionary.c test_iniparser.c unity-config.yml unity_config.hjinjac
libjinjac
src
CMakeLists.txt ast.c ast.h block_statement.c block_statement.h buffer.c buffer.h buildin.c buildin.h common.h convert.c convert.h flex_decl.h jfunction.c jfunction.h jinja_expression.l jinja_expression.y jinjac_parse.c jinjac_parse.h jinjac_stream.c jinjac_stream.h jlist.c jlist.h jobject.c jobject.h parameter.c parameter.h str_obj.c str_obj.h trace.c trace.htest
.gitignore CMakeLists.txt autotest.rb test_01.expected test_01.jinja test_01b.expected test_01b.jinja test_01c.expected test_01c.jinja test_01d.expected test_01d.jinja test_02.expected test_02.jinja test_03.expected test_03.jinja test_04.expected test_04.jinja test_05.expected test_05.jinja test_06.expected test_06.jinja test_07.expected test_07.jinja test_08.expected test_08.jinja test_08b.expected test_08b.jinja test_09.expected test_09.jinja test_10.expected test_10.jinja test_11.expected test_11.jinja test_12.expected test_12.jinja test_13.expected test_13.jinja test_14.expected test_14.jinja test_15.expected test_15.jinja test_16.expected test_16.jinja test_17.expected test_17.jinja test_18.expected test_18.jinja test_18b.expected test_18b.jinja test_18c.expected test_18c.jinja test_19.expected test_19.jinja test_19b.expected test_19b.jinja test_19c.expected test_19c.jinja test_19d.expected test_19d.jinja test_19e.expected test_19e.jinja test_19f.expected test_19f.jinja test_20.expected test_20.jinja test_21.expected test_21.jinja test_22.expected test_22.jinja test_22a.expected test_22a.jinja test_22b.expected test_22b.jinja test_23.expected test_23.jinja test_24.expected test_24.jinjalibev
Changes LICENSE Makefile Makefile.am Makefile.in README Symbols.ev Symbols.event aclocal.m4 autogen.sh compile config.guess config.h config.h.in config.status config.sub configure configure.ac depcomp ev++.h ev.3 ev.c ev.h ev.pod ev_epoll.c ev_kqueue.c ev_poll.c ev_port.c ev_select.c ev_vars.h ev_win32.c ev_wrap.h event.c event.h install-sh libev.m4 libtool ltmain.sh missing mkinstalldirs stamp-h1luajit
doc
bluequad-print.css bluequad.css contact.html ext_buffer.html ext_c_api.html ext_ffi.html ext_ffi_api.html ext_ffi_semantics.html ext_ffi_tutorial.html ext_jit.html ext_profiler.html extensions.html install.html luajit.html running.htmldynasm
dasm_arm.h dasm_arm.lua dasm_arm64.h dasm_arm64.lua dasm_mips.h dasm_mips.lua dasm_mips64.lua dasm_ppc.h dasm_ppc.lua dasm_proto.h dasm_x64.lua dasm_x86.h dasm_x86.lua dynasm.luasrc
host
.gitignore README buildvm.c buildvm.h buildvm_asm.c buildvm_fold.c buildvm_lib.c buildvm_libbc.h buildvm_peobj.c genlibbc.lua genminilua.lua genversion.lua minilua.cjit
.gitignore bc.lua bcsave.lua dis_arm.lua dis_arm64.lua dis_arm64be.lua dis_mips.lua dis_mips64.lua dis_mips64el.lua dis_mips64r6.lua dis_mips64r6el.lua dis_mipsel.lua dis_ppc.lua dis_x64.lua dis_x86.lua dump.lua p.lua v.lua zone.luawolfssl
.github
workflows
ada.yml arduino.yml async-examples.yml async.yml atecc608-sim.yml bind.yml cmake-autoconf.yml cmake.yml codespell.yml coverity-scan-fixes.yml cryptocb-only.yml curl.yml cyrus-sasl.yml disable-pk-algs.yml docker-Espressif.yml docker-OpenWrt.yml emnet-nonblock.yml fil-c.yml freertos-mem-track.yml gencertbuf.yml grpc.yml haproxy.yml hostap-vm.yml intelasm-c-fallback.yml ipmitool.yml jwt-cpp.yml krb5.yml libspdm.yml libssh2.yml libvncserver.yml linuxkm.yml macos-apple-native-cert-validation.yml mbedtls.sh mbedtls.yml membrowse-comment.yml membrowse-onboard.yml membrowse-report.yml memcached.sh memcached.yml mono.yml mosquitto.yml msmtp.yml msys2.yml multi-arch.yml multi-compiler.yml net-snmp.yml nginx.yml no-malloc.yml no-tls.yml nss.sh nss.yml ntp.yml ocsp.yml openldap.yml openssh.yml openssl-ech.yml opensslcoexist.yml openvpn.yml os-check.yml packaging.yml pam-ipmi.yml pq-all.yml pr-commit-check.yml psk.yml puf.yml python.yml rng-tools.yml rust-wrapper.yml se050-sim.yml smallStackSize.yml socat.yml softhsm.yml sssd.yml stm32-sim.yml stsafe-a120-sim.yml stunnel.yml symbol-prefixes.yml threadx.yml tls-anvil.yml trackmemory.yml watcomc.yml win-csharp-test.yml wolfCrypt-Wconversion.yml wolfboot-integration.yml wolfsm.yml xcode.yml zephyr-4.x.yml zephyr.ymlIDE
ARDUINO
Arduino_README_prepend.md README.md include.am keywords.txt library.properties.template wolfssl-arduino.cpp wolfssl-arduino.sh wolfssl.hECLIPSE
Espressif
ESP-IDF
examples
template
CMakeLists.txt Makefile README.md partitions_singleapp_large.csv sdkconfig.defaults sdkconfig.defaults.esp8266wolfssl_benchmark
VisualGDB
wolfssl_benchmark_IDF_v4.4_ESP32.sln wolfssl_benchmark_IDF_v4.4_ESP32.vgdbproj wolfssl_benchmark_IDF_v5_ESP32.sln wolfssl_benchmark_IDF_v5_ESP32.vgdbproj wolfssl_benchmark_IDF_v5_ESP32C3.sln wolfssl_benchmark_IDF_v5_ESP32C3.vgdbproj wolfssl_benchmark_IDF_v5_ESP32S3.sln wolfssl_benchmark_IDF_v5_ESP32S3.vgdbprojwolfssl_client
CMakeLists.txt Makefile README.md README_server_sm.md partitions_singleapp_large.csv sdkconfig.defaults sdkconfig.defaults.esp32c2 sdkconfig.defaults.esp8266 wolfssl_client_ESP8266.vgdbprojwolfssl_server
CMakeLists.txt Makefile README.md README_server_sm.md partitions_singleapp_large.csv sdkconfig.defaults sdkconfig.defaults.esp32c2 sdkconfig.defaults.esp8266 wolfssl_server_ESP8266.vgdbprojwolfssl_test
VisualGDB
wolfssl_test-IDF_v5_ESP32.sln wolfssl_test-IDF_v5_ESP32.vgdbproj wolfssl_test-IDF_v5_ESP32C3.sln wolfssl_test-IDF_v5_ESP32C3.vgdbproj wolfssl_test-IDF_v5_ESP32C6.sln wolfssl_test-IDF_v5_ESP32C6.vgdbproj wolfssl_test_IDF_v5_ESP32S3.sln wolfssl_test_IDF_v5_ESP32S3.vgdbprojGCC-ARM
Makefile Makefile.bench Makefile.client Makefile.common Makefile.server Makefile.static Makefile.test README.md include.am linker.ld linker_fips.ldIAR-EWARM
embOS
SAMV71_XULT
embOS_SAMV71_XULT_user_settings
user_settings.h user_settings_simple_example.h user_settings_verbose_example.hembOS_wolfcrypt_benchmark_SAMV71_XULT
README_wolfcrypt_benchmark wolfcrypt_benchmark.ewd wolfcrypt_benchmark.ewpINTIME-RTOS
Makefile README.md include.am libwolfssl.c libwolfssl.vcxproj user_settings.h wolfExamples.c wolfExamples.h wolfExamples.sln wolfExamples.vcxproj wolfssl-lib.sln wolfssl-lib.vcxprojMQX
Makefile README-jp.md README.md client-tls.c include.am server-tls.c user_config.h user_settings.hMSVS-2019-AZSPHERE
wolfssl_new_azsphere
.gitignore CMakeLists.txt CMakeSettings.json app_manifest.json applibs_versions.h launch.vs.json main.cNETOS
Makefile.wolfcrypt.inc README.md include.am user_settings.h user_settings.h-cert2425 user_settings.h-cert3389 wolfssl_netos_custom.cPlatformIO
examples
wolfssl_benchmark
CMakeLists.txt README.md platformio.ini sdkconfig.defaults wolfssl_benchmark.code-workspaceROWLEY-CROSSWORKS-ARM
Kinetis_FlashPlacement.xml README.md arm_startup.c benchmark_main.c hw.h include.am kinetis_hw.c retarget.c test_main.c user_settings.h wolfssl.hzp wolfssl_ltc.hzpRenesas
e2studio
RA6M3
README.md README_APRA6M_en.md README_APRA6M_jp.md include.amRX72N
EnvisionKit
Simple
README_EN.md README_JP.mdwolfssl_demo
key_data.c key_data.h user_settings.h wolfssl_demo.c wolfssl_demo.h wolfssl_tsip_unit_test.cSTM32Cube
README.md STM32_Benchmarks.md default_conf.ftl include.am main.c wolfssl_example.c wolfssl_example.hWIN
README.txt include.am test.vcxproj user_settings.h user_settings_dtls.h wolfssl-fips.sln wolfssl-fips.vcxprojWIN-SRTP-KDF-140-3
README.txt include.am resource.h test.vcxproj user_settings.h wolfssl-fips.rc wolfssl-fips.sln wolfssl-fips.vcxprojWIN10
README.txt include.am resource.h test.vcxproj user_settings.h wolfssl-fips.rc wolfssl-fips.sln wolfssl-fips.vcxprojXCODE
Benchmark
include.amXilinxSDK
README.md bench.sh combine.sh eclipse_formatter_profile.xml graph.sh include.am user_settings.h wolfssl_example.capple-universal
wolfssl-multiplatform
iotsafe
Makefile README.md ca-cert.c devices.c devices.h include.am main.c memory-tls.c startup.c target.ld user_settings.hmynewt
README.md apps.wolfcrypttest.pkg.yml crypto.wolfssl.pkg.yml crypto.wolfssl.syscfg.yml include.am setup.shcerts
1024
ca-cert.der ca-cert.pem ca-key.der ca-key.pem client-cert.der client-cert.pem client-key.der client-key.pem client-keyPub.der dh1024.der dh1024.pem dsa-pub-1024.pem dsa1024.der dsa1024.pem include.am rsa1024.der server-cert.der server-cert.pem server-key.der server-key.pemcrl
extra-crls
ca-int-cert-revoked.pem claim-root.pem crl_critical_entry.pem crlnum_57oct.pem crlnum_64oct.pem general-server-crl.pem large_crlnum.pem large_crlnum2.pemdilithium
bench_dilithium_level2_key.der bench_dilithium_level3_key.der bench_dilithium_level5_key.der include.amecc
bp256r1-key.der bp256r1-key.pem ca-secp256k1-cert.pem ca-secp256k1-key.pem client-bp256r1-cert.der client-bp256r1-cert.pem client-secp256k1-cert.der client-secp256k1-cert.pem genecc.sh include.am secp256k1-key.der secp256k1-key.pem secp256k1-param.pem secp256k1-privkey.der secp256k1-privkey.pem server-bp256r1-cert.der server-bp256r1-cert.pem server-secp256k1-cert.der server-secp256k1-cert.pem server2-secp256k1-cert.der server2-secp256k1-cert.pem wolfssl.cnf wolfssl_384.cnfed25519
ca-ed25519-key.der ca-ed25519-key.pem ca-ed25519-priv.der ca-ed25519-priv.pem ca-ed25519.der ca-ed25519.pem client-ed25519-key.der client-ed25519-key.pem client-ed25519-priv.der client-ed25519-priv.pem client-ed25519.der client-ed25519.pem eddsa-ed25519.der eddsa-ed25519.pem gen-ed25519-certs.sh gen-ed25519-keys.sh gen-ed25519.sh include.am root-ed25519-key.der root-ed25519-key.pem root-ed25519-priv.der root-ed25519-priv.pem root-ed25519.der root-ed25519.pem server-ed25519-cert.pem server-ed25519-key.der server-ed25519-key.pem server-ed25519-priv.der server-ed25519-priv.pem server-ed25519.der server-ed25519.pemed448
ca-ed448-key.der ca-ed448-key.pem ca-ed448-priv.der ca-ed448-priv.pem ca-ed448.der ca-ed448.pem client-ed448-key.der client-ed448-key.pem client-ed448-priv.der client-ed448-priv.pem client-ed448.der client-ed448.pem gen-ed448-certs.sh gen-ed448-keys.sh include.am root-ed448-key.der root-ed448-key.pem root-ed448-priv.der root-ed448-priv.pem root-ed448.der root-ed448.pem server-ed448-cert.pem server-ed448-key.der server-ed448-key.pem server-ed448-priv.der server-ed448-priv.pem server-ed448.der server-ed448.pemexternal
DigiCertGlobalRootCA.pem README.txt ca-digicert-ev.pem ca-globalsign-root.pem ca-google-root.pem ca_collection.pem include.amintermediate
ca_false_intermediate
gentestcert.sh int_ca.key server.key test_ca.key test_ca.pem test_int_not_cacert.pem test_sign_bynoca_srv.pem wolfssl_base.conf wolfssl_srv.conflms
bc_hss_L2_H5_W8_root.der bc_hss_L3_H5_W4_root.der bc_lms_chain_ca.der bc_lms_chain_leaf.der bc_lms_native_bc_root.der bc_lms_sha256_h10_w8_root.der bc_lms_sha256_h5_w4_root.der include.ammldsa
README.txt include.am mldsa44-cert.der mldsa44-cert.pem mldsa44-key.pem mldsa44_bare-priv.der mldsa44_bare-seed.der mldsa44_oqskeypair.der mldsa44_priv-only.der mldsa44_pub-spki.der mldsa44_seed-only.der mldsa44_seed-priv.der mldsa65-cert.der mldsa65-cert.pem mldsa65-key.pem mldsa65_bare-priv.der mldsa65_bare-seed.der mldsa65_oqskeypair.der mldsa65_priv-only.der mldsa65_pub-spki.der mldsa65_seed-only.der mldsa65_seed-priv.der mldsa87-cert.der mldsa87-cert.pem mldsa87-key.pem mldsa87_bare-priv.der mldsa87_bare-seed.der mldsa87_oqskeypair.der mldsa87_priv-only.der mldsa87_pub-spki.der mldsa87_seed-only.der mldsa87_seed-priv.derocsp
imposter-root-ca-cert.der imposter-root-ca-cert.pem imposter-root-ca-key.der imposter-root-ca-key.pem include.am index-ca-and-intermediate-cas.txt index-ca-and-intermediate-cas.txt.attr index-intermediate1-ca-issued-certs.txt index-intermediate1-ca-issued-certs.txt.attr index-intermediate2-ca-issued-certs.txt index-intermediate2-ca-issued-certs.txt.attr index-intermediate3-ca-issued-certs.txt index-intermediate3-ca-issued-certs.txt.attr intermediate1-ca-cert.der intermediate1-ca-cert.pem intermediate1-ca-key.der intermediate1-ca-key.pem intermediate2-ca-cert.der intermediate2-ca-cert.pem intermediate2-ca-key.der intermediate2-ca-key.pem intermediate3-ca-cert.der intermediate3-ca-cert.pem intermediate3-ca-key.der intermediate3-ca-key.pem ocsp-responder-cert.der ocsp-responder-cert.pem ocsp-responder-key.der ocsp-responder-key.pem openssl.cnf renewcerts-for-test.sh renewcerts.sh root-ca-cert.der root-ca-cert.pem root-ca-crl.pem root-ca-key.der root-ca-key.pem server1-cert.der server1-cert.pem server1-chain-noroot.pem server1-key.der server1-key.pem server2-cert.der server2-cert.pem server2-key.der server2-key.pem server3-cert.der server3-cert.pem server3-key.der server3-key.pem server4-cert.der server4-cert.pem server4-key.der server4-key.pem server5-cert.der server5-cert.pem server5-key.der server5-key.pem test-leaf-response.der test-multi-response.der test-response-nointern.der test-response-rsapss.der test-response.derp521
ca-p521-key.der ca-p521-key.pem ca-p521-priv.der ca-p521-priv.pem ca-p521.der ca-p521.pem client-p521-key.der client-p521-key.pem client-p521-priv.der client-p521-priv.pem client-p521.der client-p521.pem gen-p521-certs.sh gen-p521-keys.sh include.am root-p521-key.der root-p521-key.pem root-p521-priv.der root-p521-priv.pem root-p521.der root-p521.pem server-p521-cert.pem server-p521-key.der server-p521-key.pem server-p521-priv.der server-p521-priv.pem server-p521.der server-p521.pemrpk
client-cert-rpk.der client-ecc-cert-rpk.der include.am server-cert-rpk.der server-ecc-cert-rpk.derrsapss
ca-3072-rsapss-key.der ca-3072-rsapss-key.pem ca-3072-rsapss-priv.der ca-3072-rsapss-priv.pem ca-3072-rsapss.der ca-3072-rsapss.pem ca-rsapss-key.der ca-rsapss-key.pem ca-rsapss-priv.der ca-rsapss-priv.pem ca-rsapss.der ca-rsapss.pem client-3072-rsapss-key.der client-3072-rsapss-key.pem client-3072-rsapss-priv.der client-3072-rsapss-priv.pem client-3072-rsapss.der client-3072-rsapss.pem client-rsapss-key.der client-rsapss-key.pem client-rsapss-priv.der client-rsapss-priv.pem client-rsapss.der client-rsapss.pem gen-rsapss-keys.sh include.am renew-rsapss-certs.sh root-3072-rsapss-key.der root-3072-rsapss-key.pem root-3072-rsapss-priv.der root-3072-rsapss-priv.pem root-3072-rsapss.der root-3072-rsapss.pem root-rsapss-key.der root-rsapss-key.pem root-rsapss-priv.der root-rsapss-priv.pem root-rsapss.der root-rsapss.pem server-3072-rsapss-cert.pem server-3072-rsapss-key.der server-3072-rsapss-key.pem server-3072-rsapss-priv.der server-3072-rsapss-priv.pem server-3072-rsapss.der server-3072-rsapss.pem server-mix-rsapss-cert.pem server-rsapss-cert.pem server-rsapss-key.der server-rsapss-key.pem server-rsapss-priv.der server-rsapss-priv.pem server-rsapss.der server-rsapss.pemslhdsa
bench_slhdsa_sha2_128f_key.der bench_slhdsa_sha2_128s_key.der bench_slhdsa_sha2_192f_key.der bench_slhdsa_sha2_192s_key.der bench_slhdsa_sha2_256f_key.der bench_slhdsa_sha2_256s_key.der bench_slhdsa_shake128f_key.der bench_slhdsa_shake128s_key.der bench_slhdsa_shake192f_key.der bench_slhdsa_shake192s_key.der bench_slhdsa_shake256f_key.der bench_slhdsa_shake256s_key.der client-mldsa44-priv.pem client-mldsa44-sha2.der client-mldsa44-sha2.pem client-mldsa44-shake.der client-mldsa44-shake.pem gen-slhdsa-mldsa-certs.sh include.am root-slhdsa-sha2-128s-priv.der root-slhdsa-sha2-128s-priv.pem root-slhdsa-sha2-128s.der root-slhdsa-sha2-128s.pem root-slhdsa-shake-128s-priv.der root-slhdsa-shake-128s-priv.pem root-slhdsa-shake-128s.der root-slhdsa-shake-128s.pem server-mldsa44-priv.pem server-mldsa44-sha2.der server-mldsa44-sha2.pem server-mldsa44-shake.der server-mldsa44-shake.pemsm2
ca-sm2-key.der ca-sm2-key.pem ca-sm2-priv.der ca-sm2-priv.pem ca-sm2.der ca-sm2.pem client-sm2-key.der client-sm2-key.pem client-sm2-priv.der client-sm2-priv.pem client-sm2.der client-sm2.pem fix_sm2_spki.py gen-sm2-certs.sh gen-sm2-keys.sh include.am root-sm2-key.der root-sm2-key.pem root-sm2-priv.der root-sm2-priv.pem root-sm2.der root-sm2.pem self-sm2-cert.pem self-sm2-key.pem self-sm2-priv.pem server-sm2-cert.der server-sm2-cert.pem server-sm2-key.der server-sm2-key.pem server-sm2-priv.der server-sm2-priv.pem server-sm2.der server-sm2.pemstatickeys
dh-ffdhe2048-params.pem dh-ffdhe2048-pub.der dh-ffdhe2048-pub.pem dh-ffdhe2048.der dh-ffdhe2048.pem ecc-secp256r1.der ecc-secp256r1.pem gen-static.sh include.am x25519-pub.der x25519-pub.pem x25519.der x25519.pemtest
catalog.txt cert-bad-neg-int.der cert-bad-oid.der cert-bad-utf8.der cert-ext-ia.cfg cert-ext-ia.der cert-ext-ia.pem cert-ext-joi.cfg cert-ext-joi.der cert-ext-joi.pem cert-ext-mnc.der cert-ext-multiple.cfg cert-ext-multiple.der cert-ext-multiple.pem cert-ext-nc-combined.der cert-ext-nc-combined.pem cert-ext-nc.cfg cert-ext-nc.der cert-ext-nc.pem cert-ext-ncdns.der cert-ext-ncdns.pem cert-ext-ncip.der cert-ext-ncip.pem cert-ext-ncmixed.der cert-ext-ncmulti.der cert-ext-ncmulti.pem cert-ext-ncrid.der cert-ext-ncrid.pem cert-ext-nct.cfg cert-ext-nct.der cert-ext-nct.pem cert-ext-ndir-exc.cfg cert-ext-ndir-exc.der cert-ext-ndir-exc.pem cert-ext-ndir.cfg cert-ext-ndir.der cert-ext-ndir.pem cert-ext-ns.der cert-over-max-altnames.cfg cert-over-max-altnames.der cert-over-max-altnames.pem cert-over-max-nc.cfg cert-over-max-nc.der cert-over-max-nc.pem client-ecc-cert-ski.hex cn-ip-literal.der cn-ip-wildcard.der crit-cert.pem crit-key.pem dh1024.der dh1024.pem dh512.der dh512.pem digsigku.pem encrypteddata.msg gen-badsig.sh gen-ext-certs.sh gen-testcerts.sh include.am kari-keyid-cms.msg ktri-keyid-cms.msg ossl-trusted-cert.pem server-badaltname.der server-badaltname.pem server-badaltnull.der server-badaltnull.pem server-badcn.der server-badcn.pem server-badcnnull.der server-badcnnull.pem server-cert-ecc-badsig.der server-cert-ecc-badsig.pem server-cert-rsa-badsig.der server-cert-rsa-badsig.pem server-duplicate-policy.pem server-garbage.der server-garbage.pem server-goodalt.der server-goodalt.pem server-goodaltwild.der server-goodaltwild.pem server-goodcn.der server-goodcn.pem server-goodcnwild.der server-goodcnwild.pem server-localhost.der server-localhost.pem smime-test-canon.p7s smime-test-multipart-badsig.p7s smime-test-multipart.p7s smime-test.p7stest-pathlen
assemble-chains.sh chainA-ICA1-key.pem chainA-ICA1-pathlen0.pem chainA-assembled.pem chainA-entity-key.pem chainA-entity.pem chainB-ICA1-key.pem chainB-ICA1-pathlen0.pem chainB-ICA2-key.pem chainB-ICA2-pathlen1.pem chainB-assembled.pem chainB-entity-key.pem chainB-entity.pem chainC-ICA1-key.pem chainC-ICA1-pathlen1.pem chainC-assembled.pem chainC-entity-key.pem chainC-entity.pem chainD-ICA1-key.pem chainD-ICA1-pathlen127.pem chainD-assembled.pem chainD-entity-key.pem chainD-entity.pem chainE-ICA1-key.pem chainE-ICA1-pathlen128.pem chainE-assembled.pem chainE-entity-key.pem chainE-entity.pem chainF-ICA1-key.pem chainF-ICA1-pathlen1.pem chainF-ICA2-key.pem chainF-ICA2-pathlen0.pem chainF-assembled.pem chainF-entity-key.pem chainF-entity.pem chainG-ICA1-key.pem chainG-ICA1-pathlen0.pem chainG-ICA2-key.pem chainG-ICA2-pathlen1.pem chainG-ICA3-key.pem chainG-ICA3-pathlen99.pem chainG-ICA4-key.pem chainG-ICA4-pathlen5.pem chainG-ICA5-key.pem chainG-ICA5-pathlen20.pem chainG-ICA6-key.pem chainG-ICA6-pathlen10.pem chainG-ICA7-key.pem chainG-ICA7-pathlen100.pem chainG-assembled.pem chainG-entity-key.pem chainG-entity.pem chainH-ICA1-key.pem chainH-ICA1-pathlen0.pem chainH-ICA2-key.pem chainH-ICA2-pathlen2.pem chainH-ICA3-key.pem chainH-ICA3-pathlen2.pem chainH-ICA4-key.pem chainH-ICA4-pathlen2.pem chainH-assembled.pem chainH-entity-key.pem chainH-entity.pem chainI-ICA1-key.pem chainI-ICA1-no_pathlen.pem chainI-ICA2-key.pem chainI-ICA2-no_pathlen.pem chainI-ICA3-key.pem chainI-ICA3-pathlen2.pem chainI-assembled.pem chainI-entity-key.pem chainI-entity.pem chainJ-ICA1-key.pem chainJ-ICA1-no_pathlen.pem chainJ-ICA2-key.pem chainJ-ICA2-no_pathlen.pem chainJ-ICA3-key.pem chainJ-ICA3-no_pathlen.pem chainJ-ICA4-key.pem chainJ-ICA4-pathlen2.pem chainJ-assembled.pem chainJ-entity-key.pem chainJ-entity.pem include.am refreshkeys.shtest-serial0
ee_normal.pem ee_serial0.pem generate_certs.sh include.am intermediate_serial0.pem root_serial0.pem root_serial0_key.pem selfsigned_nonca_serial0.pemxmss
bc_xmss_chain_ca.der bc_xmss_chain_leaf.der bc_xmss_sha2_10_256_root.der bc_xmss_sha2_16_256_root.der bc_xmssmt_sha2_20_2_256_root.der bc_xmssmt_sha2_20_4_256_root.der bc_xmssmt_sha2_40_8_256_root.der include.amcmake
Config.cmake.in README.md config.in functions.cmake include.am options.h.in wolfssl-config-version.cmake.in wolfssl-targets.cmake.indebian
changelog.in control.in copyright include.am libwolfssl-dev.install libwolfssl.install rules.indoc
dox_comments
header_files
aes.h arc4.h ascon.h asn.h asn_public.h blake2.h bn.h camellia.h chacha.h chacha20_poly1305.h cmac.h coding.h compress.h cryptocb.h curve25519.h curve448.h des3.h dh.h doxygen_groups.h doxygen_pages.h dsa.h ecc.h eccsi.h ed25519.h ed448.h error-crypt.h evp.h hash.h hmac.h iotsafe.h kdf.h logging.h md2.h md4.h md5.h memory.h ocsp.h pem.h pkcs11.h pkcs7.h poly1305.h psa.h puf.h pwdbased.h quic.h random.h ripemd.h rsa.h sakke.h sha.h sha256.h sha3.h sha512.h signature.h siphash.h srp.h ssl.h tfm.h types.h wc_encrypt.h wc_port.h wc_she.h wc_slhdsa.h wolfio.hheader_files-ja
aes.h arc4.h ascon.h asn.h asn_public.h blake2.h bn.h camellia.h chacha.h chacha20_poly1305.h cmac.h coding.h compress.h cryptocb.h curve25519.h curve448.h des3.h dh.h doxygen_groups.h doxygen_pages.h dsa.h ecc.h eccsi.h ed25519.h ed448.h error-crypt.h evp.h hash.h hmac.h iotsafe.h kdf.h logging.h md2.h md4.h md5.h memory.h ocsp.h pem.h pkcs11.h pkcs7.h poly1305.h psa.h pwdbased.h quic.h random.h ripemd.h rsa.h sakke.h sha.h sha256.h sha3.h sha512.h signature.h siphash.h srp.h ssl.h tfm.h types.h wc_encrypt.h wc_port.h wolfio.hexamples
async
Makefile README.md async_client.c async_server.c async_tls.c async_tls.h include.am user_settings.hconfigs
README.md include.am user_settings_EBSnet.h user_settings_all.h user_settings_arduino.h user_settings_baremetal.h user_settings_ca.h user_settings_curve25519nonblock.h user_settings_dtls13.h user_settings_eccnonblock.h user_settings_espressif.h user_settings_fipsv2.h user_settings_fipsv5.h user_settings_min_ecc.h user_settings_openssl_compat.h user_settings_pkcs7.h user_settings_platformio.h user_settings_pq.h user_settings_rsa_only.h user_settings_stm32.h user_settings_template.h user_settings_tls12.h user_settings_tls13.h user_settings_wolfboot_keytools.h user_settings_wolfssh.h user_settings_wolftpm.hechoclient
echoclient.c echoclient.h echoclient.sln echoclient.vcproj echoclient.vcxproj include.am quitlinuxkm
Kbuild Makefile README.md get_thread_size.c include.am linuxkm-fips-hash-wrapper.sh linuxkm-fips-hash.c linuxkm_memory.c linuxkm_memory.h linuxkm_wc_port.h lkcapi_aes_glue.c lkcapi_dh_glue.c lkcapi_ecdh_glue.c lkcapi_ecdsa_glue.c lkcapi_glue.c lkcapi_rsa_glue.c lkcapi_sha_glue.c module_exports.c.template module_hooks.c pie_redirect_table.c wolfcrypt.lds x86_vector_register_glue.cm4
ax_add_am_macro.m4 ax_am_jobserver.m4 ax_am_macros.m4 ax_append_compile_flags.m4 ax_append_flag.m4 ax_append_link_flags.m4 ax_append_to_file.m4 ax_atomic.m4 ax_bsdkm.m4 ax_check_compile_flag.m4 ax_check_link_flag.m4 ax_compiler_version.m4 ax_count_cpus.m4 ax_create_generic_config.m4 ax_debug.m4 ax_file_escapes.m4 ax_harden_compiler_flags.m4 ax_linuxkm.m4 ax_print_to_file.m4 ax_pthread.m4 ax_require_defined.m4 ax_tls.m4 ax_vcs_checkout.m4 hexversion.m4 lib_socket_nsl.m4 visibility.m4mqx
wolfcrypt_benchmark
ReferencedRSESystems.xml wolfcrypt_benchmark_twrk70f120m_Int_Flash_DDRData_Debug_PnE_U-MultiLink.launch wolfcrypt_benchmark_twrk70f120m_Int_Flash_DDRData_Release_PnE_U-MultiLink.launch wolfcrypt_benchmark_twrk70f120m_Int_Flash_SramData_Debug_JTrace.jlink wolfcrypt_benchmark_twrk70f120m_Int_Flash_SramData_Debug_JTrace.launch wolfcrypt_benchmark_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch wolfcrypt_benchmark_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launchwolfcrypt_test
ReferencedRSESystems.xml wolfcrypt_test_twrk70f120m_Int_Flash_DDRData_Debug_PnE_U-MultiLink.launch wolfcrypt_test_twrk70f120m_Int_Flash_DDRData_Release_PnE_U-MultiLink.launch wolfcrypt_test_twrk70f120m_Int_Flash_SramData_Debug_JTrace.jlink wolfcrypt_test_twrk70f120m_Int_Flash_SramData_Debug_JTrace.launch wolfcrypt_test_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch wolfcrypt_test_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launchwolfssl_client
ReferencedRSESystems.xml wolfssl_client_twrk70f120m_Int_Flash_DDRData_Debug_PnE_U-MultiLink.launch wolfssl_client_twrk70f120m_Int_Flash_DDRData_Release_PnE_U-MultiLink.launch wolfssl_client_twrk70f120m_Int_Flash_SramData_Debug_JTrace.jlink wolfssl_client_twrk70f120m_Int_Flash_SramData_Debug_JTrace.launch wolfssl_client_twrk70f120m_Int_Flash_SramData_Debug_PnE_U-MultiLink.launch wolfssl_client_twrk70f120m_Int_Flash_SramData_Release_PnE_U-MultiLink.launchscripts
aria-cmake-build-test.sh asn1_oid_sum.pl benchmark.test benchmark_compare.sh cleanup_testfiles.sh crl-gen-openssl.test crl-revoked.test dertoc.pl dtls.test dtlscid.test external.test google.test include.am makedistsmall.sh memtest.sh ocsp-responder-openssl-interop.test ocsp-stapling-with-ca-as-responder.test ocsp-stapling-with-wolfssl-responder.test ocsp-stapling.test ocsp-stapling2.test ocsp-stapling_tls13multi.test ocsp.test openssl.test openssl_srtp.test pem.test ping.test pkcallbacks.test psk.test resume.test rsapss.test sniffer-gen.sh sniffer-ipv6.pcap sniffer-static-rsa.pcap sniffer-testsuite.test sniffer-tls12-keylog.out sniffer-tls12-keylog.pcap sniffer-tls12-keylog.sslkeylog sniffer-tls13-dh-resume.pcap sniffer-tls13-dh.pcap sniffer-tls13-ecc-resume.pcap sniffer-tls13-ecc.pcap sniffer-tls13-hrr.pcap sniffer-tls13-keylog.out sniffer-tls13-keylog.pcap sniffer-tls13-keylog.sslkeylog sniffer-tls13-x25519-resume.pcap sniffer-tls13-x25519.pcap stm32l4-v4_0_1_build.sh tls13.test trusted_peer.test unit.test.in user_settings_asm.shsrc
bio.c conf.c crl.c dtls.c dtls13.c include.am internal.c keys.c ocsp.c pk.c pk_ec.c pk_rsa.c quic.c sniffer.c ssl.c ssl_api_cert.c ssl_api_crl_ocsp.c ssl_api_pk.c ssl_asn1.c ssl_bn.c ssl_certman.c ssl_crypto.c ssl_ech.c ssl_load.c ssl_misc.c ssl_p7p12.c ssl_sess.c ssl_sk.c tls.c tls13.c wolfio.c x509.c x509_str.ctests
api
api.h api_decl.h create_ocsp_test_blobs.py include.am test_aes.c test_aes.h test_arc4.c test_arc4.h test_ascon.c test_ascon.h test_ascon_kats.h test_asn.c test_asn.h test_blake2.c test_blake2.h test_camellia.c test_camellia.h test_certman.c test_certman.h test_chacha.c test_chacha.h test_chacha20_poly1305.c test_chacha20_poly1305.h test_cmac.c test_cmac.h test_curve25519.c test_curve25519.h test_curve448.c test_curve448.h test_des3.c test_des3.h test_dh.c test_dh.h test_digest.h test_dsa.c test_dsa.h test_dtls.c test_dtls.h test_ecc.c test_ecc.h test_ed25519.c test_ed25519.h test_ed448.c test_ed448.h test_evp.c test_evp.h test_evp_cipher.c test_evp_cipher.h test_evp_digest.c test_evp_digest.h test_evp_pkey.c test_evp_pkey.h test_hash.c test_hash.h test_hmac.c test_hmac.h test_md2.c test_md2.h test_md4.c test_md4.h test_md5.c test_md5.h test_mldsa.c test_mldsa.h test_mlkem.c test_mlkem.h test_ocsp.c test_ocsp.h test_ocsp_test_blobs.h test_ossl_asn1.c test_ossl_asn1.h test_ossl_bio.c test_ossl_bio.h test_ossl_bn.c test_ossl_bn.h test_ossl_cipher.c test_ossl_cipher.h test_ossl_dgst.c test_ossl_dgst.h test_ossl_dh.c test_ossl_dh.h test_ossl_dsa.c test_ossl_dsa.h test_ossl_ec.c test_ossl_ec.h test_ossl_ecx.c test_ossl_ecx.h test_ossl_mac.c test_ossl_mac.h test_ossl_obj.c test_ossl_obj.h test_ossl_p7p12.c test_ossl_p7p12.h test_ossl_pem.c test_ossl_pem.h test_ossl_rand.c test_ossl_rand.h test_ossl_rsa.c test_ossl_rsa.h test_ossl_sk.c test_ossl_sk.h test_ossl_x509.c test_ossl_x509.h test_ossl_x509_acert.c test_ossl_x509_acert.h test_ossl_x509_crypto.c test_ossl_x509_crypto.h test_ossl_x509_ext.c test_ossl_x509_ext.h test_ossl_x509_info.c test_ossl_x509_info.h test_ossl_x509_io.c test_ossl_x509_io.h test_ossl_x509_lu.c test_ossl_x509_lu.h test_ossl_x509_name.c test_ossl_x509_name.h test_ossl_x509_pk.c test_ossl_x509_pk.h test_ossl_x509_str.c test_ossl_x509_str.h test_ossl_x509_vp.c test_ossl_x509_vp.h test_pkcs12.c test_pkcs12.h test_pkcs7.c test_pkcs7.h test_poly1305.c test_poly1305.h test_random.c test_random.h test_rc2.c test_rc2.h test_ripemd.c test_ripemd.h test_rsa.c test_rsa.h test_sha.c test_sha.h test_sha256.c test_sha256.h test_sha3.c test_sha3.h test_sha512.c test_sha512.h test_she.c test_she.h test_signature.c test_signature.h test_slhdsa.c test_slhdsa.h test_sm2.c test_sm2.h test_sm3.c test_sm3.h test_sm4.c test_sm4.h test_tls.c test_tls.h test_tls13.c test_tls13.h test_tls_ext.c test_tls_ext.h test_wc_encrypt.c test_wc_encrypt.h test_wolfmath.c test_wolfmath.h test_x509.c test_x509.hwolfcrypt
benchmark
README.md benchmark-VS2022.sln benchmark-VS2022.vcxproj benchmark-VS2022.vcxproj.user benchmark.c benchmark.h benchmark.sln benchmark.vcproj benchmark.vcxproj include.amsrc
port
Espressif
esp_crt_bundle
README.md cacrt_all.pem cacrt_deprecated.pem cacrt_local.pem esp_crt_bundle.c gen_crt_bundle.py pio_install_cryptography.pyRenesas
README.md renesas_common.c renesas_fspsm_aes.c renesas_fspsm_rsa.c renesas_fspsm_sha.c renesas_fspsm_util.c renesas_rx64_hw_sha.c renesas_rx64_hw_util.c renesas_tsip_aes.c renesas_tsip_rsa.c renesas_tsip_sha.c renesas_tsip_util.carm
armv8-32-aes-asm.S armv8-32-aes-asm_c.c armv8-32-chacha-asm.S armv8-32-chacha-asm_c.c armv8-32-curve25519.S armv8-32-curve25519_c.c armv8-32-mlkem-asm.S armv8-32-mlkem-asm_c.c armv8-32-poly1305-asm.S armv8-32-poly1305-asm_c.c armv8-32-sha256-asm.S armv8-32-sha256-asm_c.c armv8-32-sha3-asm.S armv8-32-sha3-asm_c.c armv8-32-sha512-asm.S armv8-32-sha512-asm_c.c armv8-aes-asm.S armv8-aes-asm_c.c armv8-aes.c armv8-chacha-asm.S armv8-chacha-asm_c.c armv8-curve25519.S armv8-curve25519_c.c armv8-mlkem-asm.S armv8-mlkem-asm_c.c armv8-poly1305-asm.S armv8-poly1305-asm_c.c armv8-sha256-asm.S armv8-sha256-asm_c.c armv8-sha256.c armv8-sha3-asm.S armv8-sha3-asm_c.c armv8-sha512-asm.S armv8-sha512-asm_c.c armv8-sha512.c cryptoCell.c cryptoCellHash.c thumb2-aes-asm.S thumb2-aes-asm_c.c thumb2-chacha-asm.S thumb2-chacha-asm_c.c thumb2-curve25519.S thumb2-curve25519_c.c thumb2-mlkem-asm.S thumb2-mlkem-asm_c.c thumb2-poly1305-asm.S thumb2-poly1305-asm_c.c thumb2-sha256-asm.S thumb2-sha256-asm_c.c thumb2-sha3-asm.S thumb2-sha3-asm_c.c thumb2-sha512-asm.S thumb2-sha512-asm_c.ccaam
README.md caam_aes.c caam_doc.pdf caam_driver.c caam_error.c caam_integrity.c caam_qnx.c caam_sha.c wolfcaam_aes.c wolfcaam_cmac.c wolfcaam_ecdsa.c wolfcaam_fsl_nxp.c wolfcaam_hash.c wolfcaam_hmac.c wolfcaam_init.c wolfcaam_qnx.c wolfcaam_rsa.c wolfcaam_seco.c wolfcaam_x25519.cdevcrypto
README.md devcrypto_aes.c devcrypto_ecdsa.c devcrypto_hash.c devcrypto_hmac.c devcrypto_rsa.c devcrypto_x25519.c wc_devcrypto.criscv
riscv-64-aes.c riscv-64-chacha.c riscv-64-poly1305.c riscv-64-sha256.c riscv-64-sha3.c riscv-64-sha512.cwolfssl
openssl
aes.h asn1.h asn1t.h bio.h bn.h buffer.h camellia.h cmac.h cms.h compat_types.h conf.h crypto.h des.h dh.h dsa.h ec.h ec25519.h ec448.h ecdh.h ecdsa.h ed25519.h ed448.h engine.h err.h evp.h fips_rand.h hmac.h include.am kdf.h lhash.h md4.h md5.h modes.h obj_mac.h objects.h ocsp.h opensslconf.h opensslv.h ossl_typ.h pem.h pkcs12.h pkcs7.h rand.h rc4.h ripemd.h rsa.h safestack.h sha.h sha3.h srp.h ssl.h ssl23.h stack.h tls1.h txt_db.h ui.h x509.h x509_vfy.h x509v3.hwolfcrypt
port
Renesas
renesas-fspsm-crypt.h renesas-fspsm-types.h renesas-rx64-hw-crypt.h renesas-tsip-crypt.h renesas_cmn.h renesas_fspsm_internal.h renesas_sync.h renesas_tsip_internal.h renesas_tsip_types.hcaam
caam_driver.h caam_error.h caam_qnx.h wolfcaam.h wolfcaam_aes.h wolfcaam_cmac.h wolfcaam_ecdsa.h wolfcaam_fsl_nxp.h wolfcaam_hash.h wolfcaam_qnx.h wolfcaam_rsa.h wolfcaam_seco.h wolfcaam_sha.h wolfcaam_x25519.hwrapper
Ada
examples
src
aes_verify_main.adb rsa_verify_main.adb sha256_main.adb spark_sockets.adb spark_sockets.ads spark_terminal.adb spark_terminal.ads tls_client.adb tls_client.ads tls_client_main.adb tls_server.adb tls_server.ads tls_server_main.adbtests
src
aes_bindings_tests.adb aes_bindings_tests.ads rsa_verify_bindings_tests.adb rsa_verify_bindings_tests.ads sha256_bindings_tests.adb sha256_bindings_tests.ads tests.adbCSharp
wolfSSL-Example-IOCallbacks
App.config wolfSSL-Example-IOCallbacks.cs wolfSSL-Example-IOCallbacks.csprojwolfSSL-TLS-ServerThreaded
App.config wolfSSL-TLS-ServerThreaded.cs wolfSSL-TLS-ServerThreaded.csprojrust
wolfssl-wolfcrypt
src
aes.rs blake2.rs chacha20_poly1305.rs cmac.rs cmac_mac.rs curve25519.rs dh.rs dilithium.rs ecc.rs ecdsa.rs ed25519.rs ed448.rs fips.rs hkdf.rs hmac.rs hmac_mac.rs kdf.rs lib.rs lms.rs mlkem.rs mlkem_kem.rs pbkdf2_password_hash.rs prf.rs random.rs rsa.rs rsa_pkcs1v15.rs sha.rs sha_digest.rs sys.rstests
test_aes.rs test_blake2.rs test_chacha20_poly1305.rs test_cmac.rs test_cmac_mac.rs test_curve25519.rs test_dh.rs test_dilithium.rs test_ecc.rs test_ecdsa.rs test_ed25519.rs test_ed448.rs test_hkdf.rs test_hmac.rs test_hmac_mac.rs test_kdf.rs test_lms.rs test_mlkem.rs test_mlkem_kem.rs test_pbkdf2_password_hash.rs test_prf.rs test_random.rs test_rsa.rs test_rsa_pkcs1v15.rs test_sha.rs test_sha_digest.rs test_wolfcrypt.rszephyr
samples
wolfssl_benchmark
CMakeLists.txt README install_test.sh prj.conf sample.yaml zephyr_legacy.conf zephyr_v4.1.confwolfssl_test
CMakeLists.txt README install_test.sh prj-no-malloc.conf prj.conf sample.yaml zephyr_legacy.conf zephyr_v4.1.conf
wolfssl/wolfcrypt/src/sp_dsp32.c
raw
1/* sp_cdsp_signed.c
2 *
3 * Copyright (C) 2006-2026 wolfSSL Inc.
4 *
5 * This file is part of wolfSSL.
6 *
7 * wolfSSL is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * wolfSSL is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
20 */
21
22#include <wolfssl/wolfcrypt/libwolfssl_sources.h>
23
24/* from wolfcrypt/src/sp_c32.c */
25
26#include <wolfssl/wolfcrypt/cpuid.h>
27#ifdef NO_INLINE
28 #include <wolfssl/wolfcrypt/misc.h>
29#else
30 #define WOLFSSL_MISC_INCLUDED
31 #include <wolfcrypt/src/misc.c>
32#endif
33
34#if defined(WOLFSSL_HAVE_SP_ECC)
35#ifdef WOLFSSL_DSP
36
37#include <wolfssl/wolfcrypt/sp.h>
38#include "remote.h"
39#include "hexagon_protos.h"
40#include "hexagon_types.h"
41
42#if (!defined(WC_NO_CACHE_RESISTANT) || defined(WOLFSSL_SP_SMALL)) && \
43 (defined(WOLFSSL_HAVE_SP_ECC) || !defined(WOLFSSL_RSA_PUBLIC_ONLY))
44/* Mask for address to obfuscate which of the two address will be used. */
45static const size_t addr_mask[2] = { 0, (size_t)-1 };
46#endif
47
48#ifdef WOLFSSL_HAVE_SP_ECC
49#ifndef WOLFSSL_SP_NO_256
50
51/* Point structure to use. */
52typedef struct sp_point {
53 sp_digit x[2 * 10] __attribute__((aligned(128)));
54 sp_digit y[2 * 10] __attribute__((aligned(128)));
55 sp_digit z[2 * 10] __attribute__((aligned(128)));
56 int infinity;
57} sp_point;
58
59/* The modulus (prime) of the curve P256. */
60static const sp_digit p256_mod[10] __attribute__((aligned(128))) = {
61 0x3ffffff,0x3ffffff,0x3ffffff,0x003ffff,0x0000000,0x0000000,0x0000000,
62 0x0000400,0x3ff0000,0x03fffff
63};
64#ifndef WOLFSSL_SP_SMALL
65/* The Montgomery normalizer for modulus of the curve P256. */
66static const sp_digit p256_norm_mod[10] __attribute__((aligned(128))) = {
67 0x0000001,0x0000000,0x0000000,0x3fc0000,0x3ffffff,0x3ffffff,0x3ffffff,
68 0x3fffbff,0x000ffff,0x0000000
69};
70#endif /* WOLFSSL_SP_SMALL */
71/* The Montgomery multiplier for modulus of the curve P256. */
72static const sp_digit p256_mp_mod __attribute__((aligned(128))) = 0x000001;
73#if defined(WOLFSSL_VALIDATE_ECC_KEYGEN) || defined(HAVE_ECC_SIGN) || \
74 defined(HAVE_ECC_VERIFY)
75/* The order of the curve P256. */
76static const sp_digit p256_order[10] __attribute__((aligned(128))) = {
77 0x0632551,0x272b0bf,0x1e84f3b,0x2b69c5e,0x3bce6fa,0x3ffffff,0x3ffffff,
78 0x00003ff,0x3ff0000,0x03fffff
79};
80#endif
81#if defined(HAVE_ECC_SIGN) || defined(HAVE_ECC_VERIFY)
82/* The Montgomery normalizer for order of the curve P256. */
83static const sp_digit p256_norm_order[10] __attribute__((aligned(128))) = {
84 0x39cdaaf,0x18d4f40,0x217b0c4,0x14963a1,0x0431905,0x0000000,0x0000000,
85 0x3fffc00,0x000ffff,0x0000000
86};
87#endif
88#if defined(HAVE_ECC_SIGN) || defined(HAVE_ECC_VERIFY)
89/* The Montgomery multiplier for order of the curve P256. */
90static const sp_digit p256_mp_order __attribute__((aligned(128))) = 0x200bc4f;
91#endif
92/* The base point of curve P256. */
93static const sp_point p256_base __attribute__((aligned(128))) = {
94 /* X ordinate */
95 {
96 0x098c296,0x04e5176,0x33a0f4a,0x204b7ac,0x277037d,0x0e9103c,0x3ce6e56,
97 0x1091fe2,0x1f2e12c,0x01ac5f4, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L
98 },
99 /* Y ordinate */
100 {
101 0x3bf51f5,0x1901a0d,0x1ececbb,0x15dacc5,0x22bce33,0x303e785,0x27eb4a7,
102 0x1fe6e3b,0x2e2fe1a,0x013f8d0, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L
103 },
104 /* Z ordinate */
105 {
106 0x0000001,0x0000000,0x0000000,0x0000000,0x0000000,0x0000000,0x0000000,
107 0x0000000,0x0000000,0x0000000, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L
108 },
109 /* infinity */
110 0
111};
112
113static int sp_ecc_point_new_ex(void* heap, sp_point* sp, sp_point** p)
114{
115 int ret = MP_OKAY;
116
117 if (p == NULL) {
118 ret = MEMORY_E;
119 } else {
120#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
121 (void)sp;
122 *p = (sp_point*)XMALLOC(sizeof(sp_point), heap, DYNAMIC_TYPE_ECC);
123 if (*p == NULL) {
124 ret = MEMORY_E;
125 }
126#else
127 (void)heap;
128 if (sp == NULL) {
129 ret = MEMORY_E;
130 } else {
131 *p = sp;
132 }
133#endif
134 }
135
136 return ret;
137}
138
139#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
140/* Allocate memory for point and return error. */
141#define sp_ecc_point_new(heap, sp, p) sp_ecc_point_new_ex((heap), NULL, &(p))
142#else
143/* Set pointer to data and return no error. */
144#define sp_ecc_point_new(heap, sp, p) sp_ecc_point_new_ex((heap), &(sp), &(p))
145#endif
146
147
148static void sp_ecc_point_free(sp_point* p, int clear, void* heap)
149{
150#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
151/* If valid pointer then clear point data if requested and free data. */
152 if (p != NULL) {
153 if (clear != 0) {
154 XMEMSET(p, 0, sizeof(*p));
155 }
156 XFREE(p, heap, DYNAMIC_TYPE_ECC);
157 }
158#else
159/* Clear point data if requested. */
160 if (clear != 0) {
161 XMEMSET(p, 0, sizeof(*p));
162 }
163#endif
164 (void)heap;
165}
166
167/* Multiply a number by Montgomery normalizer mod modulus (prime).
168 *
169 * r The resulting Montgomery form number.
170 * a The number to convert.
171 * m The modulus (prime).
172 * returns MEMORY_E when memory allocation fails and MP_OKAY otherwise.
173 */
174static int sp_256_mod_mul_norm_10(sp_digit* r, const sp_digit* a, const sp_digit* m)
175{
176#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
177 int64_t* td;
178#else
179 int64_t td[8];
180 int64_t a32d[8];
181#endif
182 int64_t* t;
183 int64_t* a32;
184 int64_t o;
185 int err = MP_OKAY;
186
187 (void)m;
188
189#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
190 td = (int64_t*)XMALLOC(sizeof(int64_t) * 2 * 8, NULL, DYNAMIC_TYPE_ECC);
191 if (td == NULL) {
192 err = MEMORY_E;
193 }
194#endif
195
196 if (err == MP_OKAY) {
197#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
198 t = td;
199 a32 = td + 8;
200#else
201 t = td;
202 a32 = a32d;
203#endif
204
205 a32[0] = a[0];
206 a32[0] |= a[1] << 26U;
207 a32[0] &= 0xffffffffL;
208 a32[1] = (sp_digit)(a[1] >> 6);
209 a32[1] |= a[2] << 20U;
210 a32[1] &= 0xffffffffL;
211 a32[2] = (sp_digit)(a[2] >> 12);
212 a32[2] |= a[3] << 14U;
213 a32[2] &= 0xffffffffL;
214 a32[3] = (sp_digit)(a[3] >> 18);
215 a32[3] |= a[4] << 8U;
216 a32[3] &= 0xffffffffL;
217 a32[4] = (sp_digit)(a[4] >> 24);
218 a32[4] |= a[5] << 2U;
219 a32[4] |= a[6] << 28U;
220 a32[4] &= 0xffffffffL;
221 a32[5] = (sp_digit)(a[6] >> 4);
222 a32[5] |= a[7] << 22U;
223 a32[5] &= 0xffffffffL;
224 a32[6] = (sp_digit)(a[7] >> 10);
225 a32[6] |= a[8] << 16U;
226 a32[6] &= 0xffffffffL;
227 a32[7] = (sp_digit)(a[8] >> 16);
228 a32[7] |= a[9] << 10U;
229 a32[7] &= 0xffffffffL;
230
231 /* 1 1 0 -1 -1 -1 -1 0 */
232 t[0] = 0 + a32[0] + a32[1] - a32[3] - a32[4] - a32[5] - a32[6];
233 /* 0 1 1 0 -1 -1 -1 -1 */
234 t[1] = 0 + a32[1] + a32[2] - a32[4] - a32[5] - a32[6] - a32[7];
235 /* 0 0 1 1 0 -1 -1 -1 */
236 t[2] = 0 + a32[2] + a32[3] - a32[5] - a32[6] - a32[7];
237 /* -1 -1 0 2 2 1 0 -1 */
238 t[3] = 0 - a32[0] - a32[1] + 2 * a32[3] + 2 * a32[4] + a32[5] - a32[7];
239 /* 0 -1 -1 0 2 2 1 0 */
240 t[4] = 0 - a32[1] - a32[2] + 2 * a32[4] + 2 * a32[5] + a32[6];
241 /* 0 0 -1 -1 0 2 2 1 */
242 t[5] = 0 - a32[2] - a32[3] + 2 * a32[5] + 2 * a32[6] + a32[7];
243 /* -1 -1 0 0 0 1 3 2 */
244 t[6] = 0 - a32[0] - a32[1] + a32[5] + 3 * a32[6] + 2 * a32[7];
245 /* 1 0 -1 -1 -1 -1 0 3 */
246 t[7] = 0 + a32[0] - a32[2] - a32[3] - a32[4] - a32[5] + 3 * a32[7];
247
248 t[1] += t[0] >> 32U; t[0] &= 0xffffffffL;
249 t[2] += t[1] >> 32U; t[1] &= 0xffffffffL;
250 t[3] += t[2] >> 32U; t[2] &= 0xffffffffL;
251 t[4] += t[3] >> 32U; t[3] &= 0xffffffffL;
252 t[5] += t[4] >> 32U; t[4] &= 0xffffffffL;
253 t[6] += t[5] >> 32U; t[5] &= 0xffffffffL;
254 t[7] += t[6] >> 32U; t[6] &= 0xffffffffL;
255 o = t[7] >> 32U; t[7] &= 0xffffffffL;
256 t[0] += o;
257 t[3] -= o;
258 t[6] -= o;
259 t[7] += o;
260 t[1] += t[0] >> 32U; t[0] &= 0xffffffffL;
261 t[2] += t[1] >> 32U; t[1] &= 0xffffffffL;
262 t[3] += t[2] >> 32U; t[2] &= 0xffffffffL;
263 t[4] += t[3] >> 32U; t[3] &= 0xffffffffL;
264 t[5] += t[4] >> 32U; t[4] &= 0xffffffffL;
265 t[6] += t[5] >> 32U; t[5] &= 0xffffffffL;
266 t[7] += t[6] >> 32U; t[6] &= 0xffffffffL;
267
268 r[0] = (sp_digit)(t[0]) & 0x3ffffffL;
269 r[1] = (sp_digit)(t[0] >> 26U);
270 r[1] |= t[1] << 6U;
271 r[1] &= 0x3ffffffL;
272 r[2] = (sp_digit)(t[1] >> 20U);
273 r[2] |= t[2] << 12U;
274 r[2] &= 0x3ffffffL;
275 r[3] = (sp_digit)(t[2] >> 14U);
276 r[3] |= t[3] << 18U;
277 r[3] &= 0x3ffffffL;
278 r[4] = (sp_digit)(t[3] >> 8U);
279 r[4] |= t[4] << 24U;
280 r[4] &= 0x3ffffffL;
281 r[5] = (sp_digit)(t[4] >> 2U) & 0x3ffffffL;
282 r[6] = (sp_digit)(t[4] >> 28U);
283 r[6] |= t[5] << 4U;
284 r[6] &= 0x3ffffffL;
285 r[7] = (sp_digit)(t[5] >> 22U);
286 r[7] |= t[6] << 10U;
287 r[7] &= 0x3ffffffL;
288 r[8] = (sp_digit)(t[6] >> 16U);
289 r[8] |= t[7] << 16U;
290 r[8] &= 0x3ffffffL;
291 r[9] = (sp_digit)(t[7] >> 10U);
292 }
293
294#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
295 XFREE(td, NULL, DYNAMIC_TYPE_ECC);
296#endif
297
298 return err;
299}
300
301
302/* Compare a with b in constant time.
303 *
304 * a A single precision integer.
305 * b A single precision integer.
306 * return -ve, 0 or +ve if a is less than, equal to or greater than b
307 * respectively.
308 */
309static sp_digit sp_256_cmp_10(const sp_digit* a, const sp_digit* b)
310{
311 sp_digit r = 0;
312#ifdef WOLFSSL_SP_SMALL
313 int i;
314
315 for (i=9; i>=0; i--) {
316 r |= (a[i] - b[i]) & (0 - ((r == 0) ? (sp_digit)1 : (sp_digit)0));
317 }
318#else
319 r |= (a[ 9] - b[ 9]) & (0 - (sp_digit)1);
320 r |= (a[ 8] - b[ 8]) & (0 - ((r == 0) ? (sp_digit)1 : (sp_digit)0));
321 r |= (a[ 7] - b[ 7]) & (0 - ((r == 0) ? (sp_digit)1 : (sp_digit)0));
322 r |= (a[ 6] - b[ 6]) & (0 - ((r == 0) ? (sp_digit)1 : (sp_digit)0));
323 r |= (a[ 5] - b[ 5]) & (0 - ((r == 0) ? (sp_digit)1 : (sp_digit)0));
324 r |= (a[ 4] - b[ 4]) & (0 - ((r == 0) ? (sp_digit)1 : (sp_digit)0));
325 r |= (a[ 3] - b[ 3]) & (0 - ((r == 0) ? (sp_digit)1 : (sp_digit)0));
326 r |= (a[ 2] - b[ 2]) & (0 - ((r == 0) ? (sp_digit)1 : (sp_digit)0));
327 r |= (a[ 1] - b[ 1]) & (0 - ((r == 0) ? (sp_digit)1 : (sp_digit)0));
328 r |= (a[ 0] - b[ 0]) & (0 - ((r == 0) ? (sp_digit)1 : (sp_digit)0));
329#endif /* WOLFSSL_SP_SMALL */
330
331 return r;
332}
333
334/* Normalize the values in each word to 26.
335 *
336 * a Array of sp_digit to normalize.
337 */
338static void sp_256_norm_10(sp_digit* a)
339{
340#ifdef WOLFSSL_SP_SMALL
341 int i;
342 for (i = 0; i < 9; i++) {
343 a[i+1] += a[i] >> 26;
344 a[i] &= 0x3ffffff;
345 }
346#else
347 a[1] += a[0] >> 26; a[0] = Q6_R_and_RR(a[0], 0x3ffffff);
348 a[2] += a[1] >> 26; a[1] = Q6_R_and_RR(a[1], 0x3ffffff);
349 a[3] += a[2] >> 26; a[2] = Q6_R_and_RR(a[2], 0x3ffffff);
350 a[4] += a[3] >> 26; a[3] = Q6_R_and_RR(a[3], 0x3ffffff);
351 a[5] += a[4] >> 26; a[4] = Q6_R_and_RR(a[4], 0x3ffffff);
352 a[6] += a[5] >> 26; a[5] = Q6_R_and_RR(a[5], 0x3ffffff);
353 a[7] += a[6] >> 26; a[6] = Q6_R_and_RR(a[6], 0x3ffffff);
354 a[8] += a[7] >> 26; a[7] = Q6_R_and_RR(a[7], 0x3ffffff);
355 a[9] += a[8] >> 26; a[8] = Q6_R_and_RR(a[8], 0x3ffffff);
356#endif
357}
358
359/* Conditionally subtract b from a using the mask m.
360 * m is -1 to subtract and 0 when not.
361 *
362 * r A single precision number representing condition subtract result.
363 * a A single precision number to subtract from.
364 * b A single precision number to subtract.
365 * m Mask value to apply.
366 */
367static void sp_256_cond_sub_10(sp_digit* r, const sp_digit* a,
368 const sp_digit* b, const sp_digit m)
369{
370#ifdef WOLFSSL_SP_SMALL
371 int i;
372
373 for (i = 0; i < 10; i++) {
374 r[i] = a[i] - (b[i] & m);
375 }
376#else
377 r[ 0] = Q6_R_sub_RR(a[ 0], Q6_R_and_RR(b[ 0], m));
378 r[ 1] = Q6_R_sub_RR(a[ 1], Q6_R_and_RR(b[ 1], m));
379 r[ 2] = Q6_R_sub_RR(a[ 2], Q6_R_and_RR(b[ 2], m));
380 r[ 3] = Q6_R_sub_RR(a[ 3], Q6_R_and_RR(b[ 3], m));
381 r[ 4] = Q6_R_sub_RR(a[ 4], Q6_R_and_RR(b[ 4], m));
382 r[ 5] = Q6_R_sub_RR(a[ 5], Q6_R_and_RR(b[ 5], m));
383 r[ 6] = Q6_R_sub_RR(a[ 6], Q6_R_and_RR(b[ 6], m));
384 r[ 7] = Q6_R_sub_RR(a[ 7], Q6_R_and_RR(b[ 7], m));
385 r[ 8] = Q6_R_sub_RR(a[ 8], Q6_R_and_RR(b[ 8], m));
386 r[ 9] = Q6_R_sub_RR(a[ 9], Q6_R_and_RR(b[ 9], m));
387#endif /* WOLFSSL_SP_SMALL */
388}
389
390#define sp_256_mont_reduce_order_10 sp_256_mont_reduce_10
391
392/* Mul a by scalar b and add into r. (r += a * b)
393 *
394 * r A single precision integer.
395 * a A single precision integer.
396 * b A scalar.
397 */
398SP_NOINLINE static void sp_256_mul_add_10(sp_digit* r, const sp_digit* a,
399 const sp_digit b)
400{
401#ifdef WOLFSSL_SP_SMALL
402 int64_t tb = b;
403 int64_t t = 0;
404 int i;
405
406 for (i = 0; i < 10; i++) {
407 t += (tb * a[i]) + r[i];
408 r[i] = t & 0x3ffffff;
409 t >>= 26;
410 }
411 r[10] += t;
412#else
413 int64_t tb = b;
414 int64_t t[10];
415
416 t[ 0] = Q6_P_mpy_RR(tb, a[ 0]);
417 t[ 1] = Q6_P_mpy_RR(tb, a[ 1]);
418 t[ 2] = Q6_P_mpy_RR(tb, a[ 2]);
419 t[ 3] = Q6_P_mpy_RR(tb, a[ 3]);
420 t[ 4] = Q6_P_mpy_RR(tb, a[ 4]);
421 t[ 5] = Q6_P_mpy_RR(tb, a[ 5]);
422 t[ 6] = Q6_P_mpy_RR(tb, a[ 6]);
423 t[ 7] = Q6_P_mpy_RR(tb, a[ 7]);
424 t[ 8] = Q6_P_mpy_RR(tb, a[ 8]);
425 t[ 9] = Q6_P_mpy_RR(tb, a[ 9]);
426 r[ 0] += (t[ 0] & 0x3ffffff);
427 r[ 1] += (t[ 0] >> 26) + (t[ 1] & 0x3ffffff);
428 r[ 2] += (t[ 1] >> 26) + (t[ 2] & 0x3ffffff);
429 r[ 3] += (t[ 2] >> 26) + (t[ 3] & 0x3ffffff);
430 r[ 4] += (t[ 3] >> 26) + (t[ 4] & 0x3ffffff);
431 r[ 5] += (t[ 4] >> 26) + (t[ 5] & 0x3ffffff);
432 r[ 6] += (t[ 5] >> 26) + (t[ 6] & 0x3ffffff);
433 r[ 7] += (t[ 6] >> 26) + (t[ 7] & 0x3ffffff);
434 r[ 8] += (t[ 7] >> 26) + (t[ 8] & 0x3ffffff);
435 r[ 9] += (t[ 8] >> 26) + (t[ 9] & 0x3ffffff);
436 r[10] += t[ 9] >> 26;
437#endif /* WOLFSSL_SP_SMALL */
438}
439
440/* Shift the result in the high 256 bits down to the bottom.
441 *
442 * r A single precision number.
443 * a A single precision number.
444 */
445static void sp_256_mont_shift_10(sp_digit* r, const sp_digit* a)
446{
447#ifdef WOLFSSL_SP_SMALL
448 int i;
449 sp_digit n, s;
450
451 s = a[10];
452 n = a[9] >> 22;
453 for (i = 0; i < 9; i++) {
454 n += (s & 0x3ffffff) << 4;
455 r[i] = n & 0x3ffffff;
456 n >>= 26;
457 s = a[11 + i] + (s >> 26);
458 }
459 n += s << 4;
460 r[9] = n;
461#else
462 sp_digit n, s;
463
464 s = a[10]; n = a[9] >> 22;
465 n += (s & 0x3ffffff) << 4; r[ 0] = Q6_R_and_RR(n, 0x3ffffff);
466 n >>= 26; s = a[11] + (s >> 26);
467 n += (s & 0x3ffffff) << 4; r[ 1] = Q6_R_and_RR(n, 0x3ffffff);
468 n >>= 26; s = a[12] + (s >> 26);
469 n += (s & 0x3ffffff) << 4; r[ 2] = Q6_R_and_RR(n, 0x3ffffff);
470 n >>= 26; s = a[13] + (s >> 26);
471 n += (s & 0x3ffffff) << 4; r[ 3] = Q6_R_and_RR(n, 0x3ffffff);
472 n >>= 26; s = a[14] + (s >> 26);
473 n += (s & 0x3ffffff) << 4; r[ 4] = Q6_R_and_RR(n, 0x3ffffff);
474 n >>= 26; s = a[15] + (s >> 26);
475 n += (s & 0x3ffffff) << 4; r[ 5] = Q6_R_and_RR(n, 0x3ffffff);
476 n >>= 26; s = a[16] + (s >> 26);
477 n += (s & 0x3ffffff) << 4; r[ 6] = Q6_R_and_RR(n, 0x3ffffff);
478 n >>= 26; s = a[17] + (s >> 26);
479 n += (s & 0x3ffffff) << 4; r[ 7] = Q6_R_and_RR(n, 0x3ffffff);
480 n >>= 26; s = a[18] + (s >> 26);
481 n += (s & 0x3ffffff) << 4; r[ 8] = Q6_R_and_RR(n, 0x3ffffff);
482 n >>= 26; s = a[19] + (s >> 26);
483 n += s << 4; r[ 9] = n;
484#endif /* WOLFSSL_SP_SMALL */
485 XMEMSET(&r[10], 0, sizeof(*r) * 10U);
486}
487
488
489/* Reduce the number back to 256 bits using Montgomery reduction.
490 *
491 * a A single precision number to reduce in place.
492 * m The single precision number representing the modulus.
493 * mp The digit representing the negative inverse of m mod 2^n.
494 */
495static void sp_256_mont_reduce_10(sp_digit* a, const sp_digit* m, sp_digit mp)
496{
497 sp_digit mu;
498
499
500 /* unrolled for loops due to unexpected behavior with -O optimizations */
501 if (mp != 1) {
502 mu = Q6_P_mpy_RR(a[0], mp) & 0x3ffffff;
503 sp_256_mul_add_10(a+0, m, mu);
504 a[0+1] += a[0] >> 26;
505
506 mu = Q6_P_mpy_RR(a[1], mp) & 0x3ffffff;
507 sp_256_mul_add_10(a+1, m, mu);
508 a[1+1] += a[1] >> 26;
509
510 mu = Q6_P_mpy_RR(a[2], mp) & 0x3ffffff;
511 sp_256_mul_add_10(a+2, m, mu);
512 a[2+1] += a[2] >> 26;
513
514 mu = Q6_P_mpy_RR(a[3], mp) & 0x3ffffff;
515 sp_256_mul_add_10(a+3, m, mu);
516 a[3+1] += a[3] >> 26;
517
518 mu = Q6_P_mpy_RR(a[4], mp) & 0x3ffffff;
519 sp_256_mul_add_10(a+4, m, mu);
520 a[4+1] += a[4] >> 26;
521
522 mu = Q6_P_mpy_RR(a[5], mp) & 0x3ffffff;
523 sp_256_mul_add_10(a+5, m, mu);
524 a[5+1] += a[5] >> 26;
525
526 mu = Q6_P_mpy_RR(a[6], mp) & 0x3ffffff;
527 sp_256_mul_add_10(a+6, m, mu);
528 a[6+1] += a[6] >> 26;
529
530 mu = Q6_P_mpy_RR(a[7], mp) & 0x3ffffff;
531 sp_256_mul_add_10(a+7, m, mu);
532 a[7+1] += a[7] >> 26;
533
534 mu = Q6_P_mpy_RR(a[8], mp) & 0x3ffffff;
535 sp_256_mul_add_10(a+8, m, mu);
536 a[8+1] += a[8] >> 26;
537
538 mu = Q6_P_mpy_RR(a[9], mp) & 0x3fffffL;
539 sp_256_mul_add_10(a+9, m, mu);
540 a[9+1] += a[9] >> 26;
541 a[9] &= 0x3ffffff;
542 }
543 else {
544 mu = Q6_P_mpy_RR(a[0], mp) & 0x3ffffff;
545 sp_256_mul_add_10(a+0, p256_mod, mu);
546 a[0+1] += a[0] >> 26;
547
548 mu = Q6_P_mpy_RR(a[1], mp) & 0x3ffffff;
549 sp_256_mul_add_10(a+1, p256_mod, mu);
550 a[1+1] += a[1] >> 26;
551
552 mu = Q6_P_mpy_RR(a[2], mp) & 0x3ffffff;
553 sp_256_mul_add_10(a+2, p256_mod, mu);
554 a[2+1] += a[2] >> 26;
555
556 mu = Q6_P_mpy_RR(a[3], mp) & 0x3ffffff;
557 sp_256_mul_add_10(a+3, p256_mod, mu);
558 a[3+1] += a[3] >> 26;
559
560 mu = Q6_P_mpy_RR(a[4], mp) & 0x3ffffff;
561 sp_256_mul_add_10(a+4, p256_mod, mu);
562 a[4+1] += a[4] >> 26;
563
564 mu = Q6_P_mpy_RR(a[5], mp) & 0x3ffffff;
565 sp_256_mul_add_10(a+5, p256_mod, mu);
566 a[5+1] += a[5] >> 26;
567
568 mu = Q6_P_mpy_RR(a[6], mp) & 0x3ffffff;
569 sp_256_mul_add_10(a+6, p256_mod, mu);
570 a[6+1] += a[6] >> 26;
571
572 mu = Q6_P_mpy_RR(a[7], mp) & 0x3ffffff;
573 sp_256_mul_add_10(a+7, p256_mod, mu);
574 a[7+1] += a[7] >> 26;
575
576 mu = Q6_P_mpy_RR(a[8], mp) & 0x3ffffff;
577 sp_256_mul_add_10(a+8, p256_mod, mu);
578 a[8+1] += a[8] >> 26;
579
580 mu = Q6_P_mpy_RR(a[9], mp) & 0x3fffffL;
581 sp_256_mul_add_10(a+9, p256_mod, mu);
582 a[9+1] += a[9] >> 26;
583 a[9] &= 0x3ffffff;
584 }
585
586
587 sp_256_mont_shift_10(a, a);
588 sp_256_cond_sub_10(a, a, m, 0 - (((a[9] >> 22) > 0) ?
589 (sp_digit)1 : (sp_digit)0));
590 sp_256_norm_10(a);
591}
592
593/* Multiply a and b into r. (r = a * b)
594 *
595 * r A single precision integer.
596 * a A single precision integer.
597 * b A single precision integer.
598 */
599SP_NOINLINE static void sp_256_mul_10(sp_digit* r, const sp_digit* a,
600 const sp_digit* b)
601{
602#if 1
603 int64_t t0 = Q6_P_mpy_RR(a[0], b[0]);
604 int64_t t1 = Q6_P_mpy_RR(a[0], b[1])
605 + Q6_P_mpy_RR(a[1], b[0]);
606 int64_t t2 = Q6_P_mpy_RR(a[0], b[2])
607 + Q6_P_mpy_RR(a[1], b[1])
608 + Q6_P_mpy_RR(a[2], b[0]);
609 int64_t t3 = Q6_P_mpy_RR(a[0], b[3])
610 + Q6_P_mpy_RR(a[1], b[2])
611 + Q6_P_mpy_RR(a[2], b[1])
612 + Q6_P_mpy_RR(a[3], b[0]);
613 int64_t t4 = Q6_P_mpy_RR(a[0], b[4])
614 + Q6_P_mpy_RR(a[1], b[3])
615 + Q6_P_mpy_RR(a[2], b[2])
616 + Q6_P_mpy_RR(a[3], b[1])
617 + Q6_P_mpy_RR(a[4], b[0]);
618 int64_t t5 = Q6_P_mpy_RR(a[0], b[5])
619 + Q6_P_mpy_RR(a[1], b[4])
620 + Q6_P_mpy_RR(a[2], b[3])
621 + Q6_P_mpy_RR(a[3], b[2])
622 + Q6_P_mpy_RR(a[4], b[1])
623 + Q6_P_mpy_RR(a[5], b[0]);
624 int64_t t6 = Q6_P_mpy_RR(a[0], b[6])
625 + Q6_P_mpy_RR(a[1], b[5])
626 + Q6_P_mpy_RR(a[2], b[4])
627 + Q6_P_mpy_RR(a[3], b[3])
628 + Q6_P_mpy_RR(a[4], b[2])
629 + Q6_P_mpy_RR(a[5], b[1])
630 + Q6_P_mpy_RR(a[6], b[0]);
631 int64_t t7 = Q6_P_mpy_RR(a[0], b[7])
632 + Q6_P_mpy_RR(a[1], b[6])
633 + Q6_P_mpy_RR(a[2], b[5])
634 + Q6_P_mpy_RR(a[3], b[4])
635 + Q6_P_mpy_RR(a[4], b[3])
636 + Q6_P_mpy_RR(a[5], b[2])
637 + Q6_P_mpy_RR(a[6], b[1])
638 + Q6_P_mpy_RR(a[7], b[0]);
639 int64_t t8 = Q6_P_mpy_RR(a[0], b[8])
640 + Q6_P_mpy_RR(a[1], b[7])
641 + Q6_P_mpy_RR(a[2], b[6])
642 + Q6_P_mpy_RR(a[3], b[5])
643 + Q6_P_mpy_RR(a[4], b[4])
644 + Q6_P_mpy_RR(a[5], b[3])
645 + Q6_P_mpy_RR(a[6], b[2])
646 + Q6_P_mpy_RR(a[7], b[1])
647 + Q6_P_mpy_RR(a[8], b[0]);
648 int64_t t9 = Q6_P_mpy_RR(a[0], b[9])
649 + Q6_P_mpy_RR(a[1], b[8])
650 + Q6_P_mpy_RR(a[2], b[7])
651 + Q6_P_mpy_RR(a[3], b[6])
652 + Q6_P_mpy_RR(a[4], b[5])
653 + Q6_P_mpy_RR(a[5], b[4])
654 + Q6_P_mpy_RR(a[6], b[3])
655 + Q6_P_mpy_RR(a[7], b[2])
656 + Q6_P_mpy_RR(a[8], b[1])
657 + Q6_P_mpy_RR(a[9], b[0]);
658 int64_t t10 = Q6_P_mpy_RR(a[1], b[9])
659 + Q6_P_mpy_RR(a[2], b[8])
660 + Q6_P_mpy_RR(a[3], b[7])
661 + Q6_P_mpy_RR(a[4], b[6])
662 + Q6_P_mpy_RR(a[5], b[5])
663 + Q6_P_mpy_RR(a[6], b[4])
664 + Q6_P_mpy_RR(a[7], b[3])
665 + Q6_P_mpy_RR(a[8], b[2])
666 + Q6_P_mpy_RR(a[9], b[1]);
667 int64_t t11 = Q6_P_mpy_RR(a[2], b[9])
668 + Q6_P_mpy_RR(a[3], b[8])
669 + Q6_P_mpy_RR(a[4], b[7])
670 + Q6_P_mpy_RR(a[5], b[6])
671 + Q6_P_mpy_RR(a[6], b[5])
672 + Q6_P_mpy_RR(a[7], b[4])
673 + Q6_P_mpy_RR(a[8], b[3])
674 + Q6_P_mpy_RR(a[9], b[2]);
675 int64_t t12 = Q6_P_mpy_RR(a[3], b[9])
676 + Q6_P_mpy_RR(a[4], b[8])
677 + Q6_P_mpy_RR(a[5], b[7])
678 + Q6_P_mpy_RR(a[6], b[6])
679 + Q6_P_mpy_RR(a[7], b[5])
680 + Q6_P_mpy_RR(a[8], b[4])
681 + Q6_P_mpy_RR(a[9], b[3]);
682 int64_t t13 = Q6_P_mpy_RR(a[4], b[9])
683 + Q6_P_mpy_RR(a[5], b[8])
684 + Q6_P_mpy_RR(a[6], b[7])
685 + Q6_P_mpy_RR(a[7], b[6])
686 + Q6_P_mpy_RR(a[8], b[5])
687 + Q6_P_mpy_RR(a[9], b[4]);
688 int64_t t14 = Q6_P_mpy_RR(a[5], b[9])
689 + Q6_P_mpy_RR(a[6], b[8])
690 + Q6_P_mpy_RR(a[7], b[7])
691 + Q6_P_mpy_RR(a[8], b[6])
692 + Q6_P_mpy_RR(a[9], b[5]);
693 int64_t t15 = Q6_P_mpy_RR(a[6], b[9])
694 + Q6_P_mpy_RR(a[7], b[8])
695 + Q6_P_mpy_RR(a[8], b[7])
696 + Q6_P_mpy_RR(a[9], b[6]);
697 int64_t t16 = Q6_P_mpy_RR(a[7], b[9])
698 + Q6_P_mpy_RR(a[8], b[8])
699 + Q6_P_mpy_RR(a[9], b[7]);
700 int64_t t17 = Q6_P_mpy_RR(a[8], b[9])
701 + Q6_P_mpy_RR(a[9], b[8]);
702 int64_t t18 = Q6_P_mpy_RR(a[9], b[9]);
703
704
705 t1 += t0 >> 26; r[ 0] = t0 & 0x3ffffff;
706 t2 += t1 >> 26; r[ 1] = t1 & 0x3ffffff;
707 t3 += t2 >> 26; r[ 2] = t2 & 0x3ffffff;
708 t4 += t3 >> 26; r[ 3] = t3 & 0x3ffffff;
709 t5 += t4 >> 26; r[ 4] = t4 & 0x3ffffff;
710 t6 += t5 >> 26; r[ 5] = t5 & 0x3ffffff;
711 t7 += t6 >> 26; r[ 6] = t6 & 0x3ffffff;
712 t8 += t7 >> 26; r[ 7] = t7 & 0x3ffffff;
713 t9 += t8 >> 26; r[ 8] = t8 & 0x3ffffff;
714 t10 += t9 >> 26; r[ 9] = t9 & 0x3ffffff;
715 t11 += t10 >> 26; r[10] = t10 & 0x3ffffff;
716 t12 += t11 >> 26; r[11] = t11 & 0x3ffffff;
717 t13 += t12 >> 26; r[12] = t12 & 0x3ffffff;
718 t14 += t13 >> 26; r[13] = t13 & 0x3ffffff;
719 t15 += t14 >> 26; r[14] = t14 & 0x3ffffff;
720 t16 += t15 >> 26; r[15] = t15 & 0x3ffffff;
721 t17 += t16 >> 26; r[16] = t16 & 0x3ffffff;
722 t18 += t17 >> 26; r[17] = t17 & 0x3ffffff;
723 r[19] = (sp_digit)(t18 >> 26);
724 r[18] = t18 & 0x3ffffff;
725#endif
726#if 0
727 /* Testing speeds with using HVX_Vectors */
728 {
729 int64_t t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18;
730 HVX_Vector av, splat;
731 HVX_Vector vlow, vhi;
732
733 av = Q6_V_vzero();
734 vlow = Q6_V_vzero();
735 vhi = Q6_V_vzero();
736
737 XMEMCPY((byte*)&av, (byte*)a, 40);
738
739 splat = Q6_V_vsplat_R(b[0]);
740 vlow = Q6_Vw_vmpyieo_VhVh(av, splat);
741 vlow = Q6_Vw_vmpyieacc_VwVwVuh(vlow, av, splat);
742
743 vhi = Q6_Vw_vmpye_VwVuh(av, splat);
744 vhi = Q6_Vw_vmpyoacc_VwVwVh_s1_sat_shift(vhi, av, splat);
745 unsigned int* loi = (unsigned int*)&vlow;
746 int* hii = (int*)&vhi;
747
748 /* a[0] * b[0] */
749 t0 = loi[0] | ((int64_t)hii[0] << 31);
750
751 /* a[1] * b[0] */
752 t1 = loi[1] | ((int64_t)hii[1] << 31);
753
754 /* a[2] * b[0] */
755 t2 = loi[2] | ((int64_t)hii[2] << 31);
756
757 /* a[3] * b[0] */
758 t3 = loi[3] | ((int64_t)hii[3] << 31);
759
760 /* a[4] * b[0] */
761 t4 = loi[4] | ((int64_t)hii[4] << 31);
762
763 /* a[5] * b[0] */
764 t5 = loi[5] | ((int64_t)hii[5] << 31);
765
766 /* a[6] * b[0] */
767 t6 = loi[6] | ((int64_t)hii[6] << 31);
768
769 /* a[7] * b[0] */
770 t7 = loi[7] | ((int64_t)hii[7] << 31);
771
772 /* a[8] * b[0] */
773 t8 = loi[8] | ((int64_t)hii[8] << 31);
774
775 /* a[9] * b[0] */
776 t9 = loi[9] | ((int64_t)hii[9] << 31);
777
778 /* a[*] * b[1] */
779 splat = Q6_V_vsplat_R(b[1]);
780 vlow = Q6_Vw_vmpyieo_VhVh(av, splat);
781 vlow = Q6_Vw_vmpyieacc_VwVwVuh(vlow, av, splat);
782 vhi = Q6_Vw_vmpye_VwVuh(av, splat);
783 vhi = Q6_Vw_vmpyoacc_VwVwVh_s1_sat_shift(vhi, av, splat);
784 loi = (unsigned int*)&vlow;
785 hii = (int*)&vhi;
786
787 /* a[0] * b[1] */
788 t1 += (loi[0] | ((int64_t)hii[0] << 31));
789
790 /* a[1] * b[1] */
791 t2 += (loi[1] | ((int64_t)hii[1] << 31));
792
793 /* a[2] * b[1] */
794 t3 += (loi[2] | ((int64_t)hii[2] << 31));
795
796 /* a[3] * b[1] */
797 t4 += (loi[3] | ((int64_t)hii[3] << 31));
798
799 /* a[4] * b[1] */
800 t5 += (loi[4] | ((int64_t)hii[4] << 31));
801
802 /* a[5] * b[1] */
803 t6 += (loi[5] | ((int64_t)hii[5] << 31));
804
805 /* a[6] * b[1] */
806 t7 += (loi[6] | ((int64_t)hii[6] << 31));
807
808 /* a[7] * b[1] */
809 t8 += (loi[7] | ((int64_t)hii[7] << 31));
810
811 /* a[8] * b[1] */
812 t9 += (loi[8] | ((int64_t)hii[8] << 31));
813
814 /* a[9] * b[1] */
815 t10 = (loi[9] | ((int64_t)hii[9] << 31));
816
817 /* a[*] * b[2] */
818 splat = Q6_V_vsplat_R(b[2]);
819 vlow = Q6_Vw_vmpyieo_VhVh(av, splat);
820 vlow = Q6_Vw_vmpyieacc_VwVwVuh(vlow, av, splat);
821 vhi = Q6_Vw_vmpye_VwVuh(av, splat);
822 vhi = Q6_Vw_vmpyoacc_VwVwVh_s1_sat_shift(vhi, av, splat);
823 loi = (unsigned int*)&vlow;
824 hii = (int*)&vhi;
825
826
827 /* a[0] * b[2] */
828 t2 += (loi[0] | ((int64_t)hii[0] << 31));
829
830 /* a[1] * b[2] */
831 t3 += (loi[1] | ((int64_t)hii[1] << 31));
832
833 /* a[2] * b[2] */
834 t4 += (loi[2] | ((int64_t)hii[2] << 31));
835
836 /* a[3] * b[2] */
837 t5 += (loi[3] | ((int64_t)hii[3] << 31));
838
839 /* a[4] * b[2] */
840 t6 += (loi[4] | ((int64_t)hii[4] << 31));
841
842 /* a[5] * b[2] */
843 t7 += (loi[5] | ((int64_t)hii[5] << 31));
844
845 /* a[6] * b[2] */
846 t8 += (loi[6] | ((int64_t)hii[6] << 31));
847
848 /* a[7] * b[2] */
849 t9 += (loi[7] | ((int64_t)hii[7] << 31));
850
851 /* a[8] * b[2] */
852 t10 += (loi[8] | ((int64_t)hii[8] << 31));
853
854 /* a[9] * b[2] */
855 t11 = (loi[9] | ((int64_t)hii[9] << 31));
856
857
858 /* a[*] * b[3] */
859 splat = Q6_V_vsplat_R(b[3]);
860 vlow = Q6_Vw_vmpyieo_VhVh(av, splat);
861 vlow = Q6_Vw_vmpyieacc_VwVwVuh(vlow, av, splat);
862 vhi = Q6_Vw_vmpye_VwVuh(av, splat);
863 vhi = Q6_Vw_vmpyoacc_VwVwVh_s1_sat_shift(vhi, av, splat);
864 loi = (unsigned int*)&vlow;
865 hii = (int*)&vhi;
866
867
868 /* a[0] * b[3] */
869 t3 += (loi[0] | ((int64_t)hii[0] << 31));
870
871 /* a[1] * b[3] */
872 t4 += (loi[1] | ((int64_t)hii[1] << 31));
873
874 /* a[2] * b[3] */
875 t5 += (loi[2] | ((int64_t)hii[2] << 31));
876
877 /* a[3] * b[3] */
878 t6 += (loi[3] | ((int64_t)hii[3] << 31));
879
880 /* a[4] * b[3] */
881 t7 += (loi[4] | ((int64_t)hii[4] << 31));
882
883 /* a[5] * b[3] */
884 t8 += (loi[5] | ((int64_t)hii[5] << 31));
885
886 /* a[6] * b[3] */
887 t9 += (loi[6] | ((int64_t)hii[6] << 31));
888
889 /* a[7] * b[3] */
890 t10 += (loi[7] | ((int64_t)hii[7] << 31));
891
892 /* a[8] * b[3] */
893 t11 += (loi[8] | ((int64_t)hii[8] << 31));
894
895 /* a[9] * b[3] */
896 t12 = (loi[9] | ((int64_t)hii[9] << 31));
897
898
899 /* a[*] * b[4] */
900 splat = Q6_V_vsplat_R(b[4]);
901 vlow = Q6_Vw_vmpyieo_VhVh(av, splat);
902 vlow = Q6_Vw_vmpyieacc_VwVwVuh(vlow, av, splat);
903 vhi = Q6_Vw_vmpye_VwVuh(av, splat);
904 vhi = Q6_Vw_vmpyoacc_VwVwVh_s1_sat_shift(vhi, av, splat);
905 loi = (unsigned int*)&vlow;
906 hii = (int*)&vhi;
907
908
909 /* a[0] * b[4] */
910 t4 += (loi[0] | ((int64_t)hii[0] << 31));
911
912 /* a[1] * b[4] */
913 t5 += (loi[1] | ((int64_t)hii[1] << 31));
914
915 /* a[2] * b[4] */
916 t6 += (loi[2] | ((int64_t)hii[2] << 31));
917
918 /* a[3] * b[4] */
919 t7 += (loi[3] | ((int64_t)hii[3] << 31));
920
921 /* a[4] * b[4] */
922 t8 += (loi[4] | ((int64_t)hii[4] << 31));
923
924 /* a[5] * b[4] */
925 t9 += (loi[5] | ((int64_t)hii[5] << 31));
926
927 /* a[6] * b[4] */
928 t10 += (loi[6] | ((int64_t)hii[6] << 31));
929
930 /* a[7] * b[4] */
931 t11 += (loi[7] | ((int64_t)hii[7] << 31));
932
933 /* a[8] * b[4] */
934 t12 += (loi[8] | ((int64_t)hii[8] << 31));
935
936 /* a[9] * b[4] */
937 t13 = (loi[9] | ((int64_t)hii[9] << 31));
938
939
940 /* a[*] * b[5] */
941 splat = Q6_V_vsplat_R(b[5]);
942 vlow = Q6_Vw_vmpyieo_VhVh(av, splat);
943 vlow = Q6_Vw_vmpyieacc_VwVwVuh(vlow, av, splat);
944 vhi = Q6_Vw_vmpye_VwVuh(av, splat);
945 vhi = Q6_Vw_vmpyoacc_VwVwVh_s1_sat_shift(vhi, av, splat);
946 loi = (unsigned int*)&vlow;
947 hii = (int*)&vhi;
948
949
950 /* a[0] * b[5] */
951 t5 += (loi[0] | ((int64_t)hii[0] << 31));
952
953 /* a[1] * b[5] */
954 t6 += (loi[1] | ((int64_t)hii[1] << 31));
955
956 /* a[2] * b[5] */
957 t7 += (loi[2] | ((int64_t)hii[2] << 31));
958
959 /* a[3] * b[5] */
960 t8 += (loi[3] | ((int64_t)hii[3] << 31));
961
962 /* a[4] * b[5] */
963 t9 += (loi[4] | ((int64_t)hii[4] << 31));
964
965 /* a[5] * b[5] */
966 t10 += (loi[5] | ((int64_t)hii[5] << 31));
967
968 /* a[6] * b[5] */
969 t11 += (loi[6] | ((int64_t)hii[6] << 31));
970
971 /* a[7] * b[5] */
972 t12 += (loi[7] | ((int64_t)hii[7] << 31));
973
974 /* a[8] * b[5] */
975 t13 += (loi[8] | ((int64_t)hii[8] << 31));
976
977 /* a[9] * b[5] */
978 t14 = (loi[9] | ((int64_t)hii[9] << 31));
979
980
981 /* a[*] * b[6] */
982 splat = Q6_V_vsplat_R(b[6]);
983 vlow = Q6_Vw_vmpyieo_VhVh(av, splat);
984 vlow = Q6_Vw_vmpyieacc_VwVwVuh(vlow, av, splat);
985 vhi = Q6_Vw_vmpye_VwVuh(av, splat);
986 vhi = Q6_Vw_vmpyoacc_VwVwVh_s1_sat_shift(vhi, av, splat);
987 loi = (unsigned int*)&vlow;
988 hii = (int*)&vhi;
989
990
991 /* a[0] * b[6] */
992 t6 += (loi[0] | ((int64_t)hii[0] << 31));
993
994 /* a[1] * b[6] */
995 t7 += (loi[1] | ((int64_t)hii[1] << 31));
996
997 /* a[2] * b[6] */
998 t8 += (loi[2] | ((int64_t)hii[2] << 31));
999
1000 /* a[3] * b[6] */
1001 t9 += (loi[3] | ((int64_t)hii[3] << 31));
1002
1003 /* a[4] * b[6] */
1004 t10 += (loi[4] | ((int64_t)hii[4] << 31));
1005
1006 /* a[5] * b[6] */
1007 t11 += (loi[5] | ((int64_t)hii[5] << 31));
1008
1009 /* a[6] * b[6] */
1010 t12 += (loi[6] | ((int64_t)hii[6] << 31));
1011
1012 /* a[7] * b[6] */
1013 t13 += (loi[7] | ((int64_t)hii[7] << 31));
1014
1015 /* a[8] * b[6] */
1016 t14 += (loi[8] | ((int64_t)hii[8] << 31));
1017
1018 /* a[9] * b[6] */
1019 t15 = (loi[9] | ((int64_t)hii[9] << 31));
1020
1021
1022
1023 /* a[*] * b[7] */
1024 splat = Q6_V_vsplat_R(b[7]);
1025 vlow = Q6_Vw_vmpyieo_VhVh(av, splat);
1026 vlow = Q6_Vw_vmpyieacc_VwVwVuh(vlow, av, splat);
1027 vhi = Q6_Vw_vmpye_VwVuh(av, splat);
1028 vhi = Q6_Vw_vmpyoacc_VwVwVh_s1_sat_shift(vhi, av, splat);
1029 loi = (unsigned int*)&vlow;
1030 hii = (int*)&vhi;
1031
1032
1033 /* a[0] * b[7] */
1034 t7 += (loi[0] | ((int64_t)hii[0] << 31));
1035
1036 /* a[1] * b[7] */
1037 t8 += (loi[1] | ((int64_t)hii[1] << 31));
1038
1039 /* a[2] * b[7] */
1040 t9 += (loi[2] | ((int64_t)hii[2] << 31));
1041
1042 /* a[3] * b[7] */
1043 t10 += (loi[3] | ((int64_t)hii[3] << 31));
1044
1045 /* a[4] * b[7] */
1046 t11 += (loi[4] | ((int64_t)hii[4] << 31));
1047
1048 /* a[5] * b[7] */
1049 t12 += (loi[5] | ((int64_t)hii[5] << 31));
1050
1051 /* a[6] * b[7] */
1052 t13 += (loi[6] | ((int64_t)hii[6] << 31));
1053
1054 /* a[7] * b[7] */
1055 t14 += (loi[7] | ((int64_t)hii[7] << 31));
1056
1057 /* a[8] * b[7] */
1058 t15 += (loi[8] | ((int64_t)hii[8] << 31));
1059
1060 /* a[9] * b[7] */
1061 t16 = (loi[9] | ((int64_t)hii[9] << 31));
1062
1063
1064 /* a[*] * b[8] */
1065 splat = Q6_V_vsplat_R(b[8]);
1066 vlow = Q6_Vw_vmpyieo_VhVh(av, splat);
1067 vlow = Q6_Vw_vmpyieacc_VwVwVuh(vlow, av, splat);
1068 vhi = Q6_Vw_vmpye_VwVuh(av, splat);
1069 vhi = Q6_Vw_vmpyoacc_VwVwVh_s1_sat_shift(vhi, av, splat);
1070 loi = (unsigned int*)&vlow;
1071 hii = (int*)&vhi;
1072
1073
1074 /* a[0] * b[8] */
1075 t8 += (loi[0] | ((int64_t)hii[0] << 31));
1076
1077 /* a[1] * b[8] */
1078 t9 += (loi[1] | ((int64_t)hii[1] << 31));
1079
1080 /* a[2] * b[8] */
1081 t10 += (loi[2] | ((int64_t)hii[2] << 31));
1082
1083 /* a[3] * b[8] */
1084 t11 += (loi[3] | ((int64_t)hii[3] << 31));
1085
1086 /* a[4] * b[8] */
1087 t12 += (loi[4] | ((int64_t)hii[4] << 31));
1088
1089 /* a[5] * b[8] */
1090 t13 += (loi[5] | ((int64_t)hii[5] << 31));
1091
1092 /* a[6] * b[8] */
1093 t14 += (loi[6] | ((int64_t)hii[6] << 31));
1094
1095 /* a[7] * b[8] */
1096 t15 += (loi[7] | ((int64_t)hii[7] << 31));
1097
1098 /* a[8] * b[8] */
1099 t16 += (loi[8] | ((int64_t)hii[8] << 31));
1100
1101 /* a[9] * b[8] */
1102 t17 = (loi[9] | ((int64_t)hii[9] << 31));
1103
1104
1105 /* a[*] * b[9] */
1106 splat = Q6_V_vsplat_R(b[9]);
1107 vlow = Q6_Vw_vmpyieo_VhVh(av, splat);
1108 vlow = Q6_Vw_vmpyieacc_VwVwVuh(vlow, av, splat);
1109 vhi = Q6_Vw_vmpye_VwVuh(av, splat);
1110 vhi = Q6_Vw_vmpyoacc_VwVwVh_s1_sat_shift(vhi, av, splat);
1111 loi = (unsigned int*)&vlow;
1112 hii = (int*)&vhi;
1113
1114
1115 /* a[0] * b[9] */
1116 t9 += (loi[0] | ((int64_t)hii[0] << 31));
1117
1118 /* a[1] * b[9] */
1119 t10 += (loi[1] | ((int64_t)hii[1] << 31));
1120
1121 /* a[2] * b[9] */
1122 t11 += (loi[2] | ((int64_t)hii[2] << 31));
1123
1124 /* a[3] * b[9] */
1125 t12 += (loi[3] | ((int64_t)hii[3] << 31));
1126
1127 /* a[4] * b[9] */
1128 t13 += (loi[4] | ((int64_t)hii[4] << 31));
1129
1130 /* a[5] * b[9] */
1131 t14 += (loi[5] | ((int64_t)hii[5] << 31));
1132
1133 /* a[6] * b[9] */
1134 t15 += (loi[6] | ((int64_t)hii[6] << 31));
1135
1136 /* a[7] * b[9] */
1137 t16 += (loi[7] | ((int64_t)hii[7] << 31));
1138
1139 /* a[8] * b[9] */
1140 t17 += (loi[8] | ((int64_t)hii[8] << 31));
1141
1142 /* a[9] * b[9] */
1143 t18 = (loi[9] | ((int64_t)hii[9] << 31));
1144
1145 t1 += t0 >> 26; r[ 0] = t0 & 0x3ffffff;
1146 t2 += t1 >> 26; r[ 1] = t1 & 0x3ffffff;
1147 t3 += t2 >> 26; r[ 2] = t2 & 0x3ffffff;
1148 t4 += t3 >> 26; r[ 3] = t3 & 0x3ffffff;
1149 t5 += t4 >> 26; r[ 4] = t4 & 0x3ffffff;
1150 t6 += t5 >> 26; r[ 5] = t5 & 0x3ffffff;
1151 t7 += t6 >> 26; r[ 6] = t6 & 0x3ffffff;
1152 t8 += t7 >> 26; r[ 7] = t7 & 0x3ffffff;
1153 t9 += t8 >> 26; r[ 8] = t8 & 0x3ffffff;
1154 t10 += t9 >> 26; r[ 9] = t9 & 0x3ffffff;
1155 t11 += t10 >> 26; r[10] = t10 & 0x3ffffff;
1156 t12 += t11 >> 26; r[11] = t11 & 0x3ffffff;
1157 t13 += t12 >> 26; r[12] = t12 & 0x3ffffff;
1158 t14 += t13 >> 26; r[13] = t13 & 0x3ffffff;
1159 t15 += t14 >> 26; r[14] = t14 & 0x3ffffff;
1160 t16 += t15 >> 26; r[15] = t15 & 0x3ffffff;
1161 t17 += t16 >> 26; r[16] = t16 & 0x3ffffff;
1162 t18 += t17 >> 26; r[17] = t17 & 0x3ffffff;
1163 r[19] = (sp_digit)(t18 >> 26);
1164 r[18] = t18 & 0x3ffffff;
1165 }
1166#endif
1167}
1168
1169
1170/* Multiply two Montgomery form numbers mod the modulus (prime).
1171 * (r = a * b mod m)
1172 *
1173 * r Result of multiplication.
1174 * a First number to multiply in Montgomery form.
1175 * b Second number to multiply in Montgomery form.
1176 * m Modulus (prime).
1177 * mp Montgomery multiplier.
1178 */
1179static void sp_256_mont_mul_10(sp_digit* r, const sp_digit* a, const sp_digit* b,
1180 const sp_digit* m, sp_digit mp)
1181{
1182 sp_256_mul_10(r, a, b);
1183 sp_256_mont_reduce_10(r, m, mp);
1184}
1185
1186
1187/* Square a and put result in r. (r = a * a)
1188 *
1189 * r A single precision integer.
1190 * a A single precision integer.
1191 */
1192SP_NOINLINE static void sp_256_sqr_10(sp_digit* r, const sp_digit* a)
1193{
1194 int64_t t0 = Q6_P_mpy_RR(a[0], a[0]);
1195 int64_t t1 = Q6_P_mpy_RR(a[0], a[1]) * 2;
1196 int64_t t2 = Q6_P_mpy_RR(a[0], a[2]) * 2
1197 + Q6_P_mpy_RR(a[1], a[1]);
1198 int64_t t3 = (Q6_P_mpy_RR(a[0], a[3])
1199 + Q6_P_mpy_RR(a[1], a[2])) * 2;
1200 int64_t t4 = (Q6_P_mpy_RR(a[ 0], a[ 4])
1201 + Q6_P_mpy_RR(a[ 1], a[ 3])) * 2
1202 + Q6_P_mpy_RR(a[ 2], a[ 2]);
1203 int64_t t5 = (Q6_P_mpy_RR(a[ 0], a[ 5])
1204 + Q6_P_mpy_RR(a[ 1], a[ 4])
1205 + Q6_P_mpy_RR(a[ 2], a[ 3])) * 2;
1206 int64_t t6 = (Q6_P_mpy_RR(a[ 0], a[ 6])
1207 + Q6_P_mpy_RR(a[ 1], a[ 5])
1208 + Q6_P_mpy_RR(a[ 2], a[ 4])) * 2
1209 + Q6_P_mpy_RR(a[ 3], a[ 3]);
1210 int64_t t7 = (Q6_P_mpy_RR(a[ 0], a[ 7])
1211 + Q6_P_mpy_RR(a[ 1], a[ 6])
1212 + Q6_P_mpy_RR(a[ 2], a[ 5])
1213 + Q6_P_mpy_RR(a[ 3], a[ 4])) * 2;
1214 int64_t t8 = (Q6_P_mpy_RR(a[ 0], a[ 8])
1215 + Q6_P_mpy_RR(a[ 1], a[ 7])
1216 + Q6_P_mpy_RR(a[ 2], a[ 6])
1217 + Q6_P_mpy_RR(a[ 3], a[ 5])) * 2
1218 + Q6_P_mpy_RR(a[ 4], a[ 4]);
1219 int64_t t9 = (Q6_P_mpy_RR(a[ 0], a[ 9])
1220 + Q6_P_mpy_RR(a[ 1], a[ 8])
1221 + Q6_P_mpy_RR(a[ 2], a[ 7])
1222 + Q6_P_mpy_RR(a[ 3], a[ 6])
1223 + Q6_P_mpy_RR(a[ 4], a[ 5])) * 2;
1224 int64_t t10 = (Q6_P_mpy_RR(a[ 1], a[ 9])
1225 + Q6_P_mpy_RR(a[ 2], a[ 8])
1226 + Q6_P_mpy_RR(a[ 3], a[ 7])
1227 + Q6_P_mpy_RR(a[ 4], a[ 6])) * 2
1228 + Q6_P_mpy_RR(a[ 5], a[ 5]);
1229 int64_t t11 = (Q6_P_mpy_RR(a[ 2], a[ 9])
1230 + Q6_P_mpy_RR(a[ 3], a[ 8])
1231 + Q6_P_mpy_RR(a[ 4], a[ 7])
1232 + Q6_P_mpy_RR(a[ 5], a[ 6])) * 2;
1233 int64_t t12 = (Q6_P_mpy_RR(a[ 3], a[ 9])
1234 + Q6_P_mpy_RR(a[ 4], a[ 8])
1235 + Q6_P_mpy_RR(a[ 5], a[ 7])) * 2
1236 + Q6_P_mpy_RR(a[ 6], a[ 6]);
1237 int64_t t13 = (Q6_P_mpy_RR(a[ 4], a[ 9])
1238 + Q6_P_mpy_RR(a[ 5], a[ 8])
1239 + Q6_P_mpy_RR(a[ 6], a[ 7])) * 2;
1240 int64_t t14 = (Q6_P_mpy_RR(a[ 5], a[ 9])
1241 + Q6_P_mpy_RR(a[ 6], a[ 8])) * 2
1242 + Q6_P_mpy_RR(a[ 7], a[ 7]);
1243 int64_t t15 =( Q6_P_mpy_RR(a[ 6], a[ 9])
1244 + Q6_P_mpy_RR(a[ 7], a[ 8])) * 2;
1245 int64_t t16 = Q6_P_mpy_RR(a[ 7], a[ 9]) * 2
1246 + Q6_P_mpy_RR(a[ 8], a[ 8]);
1247 int64_t t17 = Q6_P_mpy_RR(a[ 8], a[ 9]) * 2;
1248 int64_t t18 = Q6_P_mpy_RR(a[ 9], a[ 9]);
1249
1250 t1 += t0 >> 26; r[ 0] = t0 & 0x3ffffff;
1251 t2 += t1 >> 26; r[ 1] = t1 & 0x3ffffff;
1252 t3 += t2 >> 26; r[ 2] = t2 & 0x3ffffff;
1253 t4 += t3 >> 26; r[ 3] = t3 & 0x3ffffff;
1254 t5 += t4 >> 26; r[ 4] = t4 & 0x3ffffff;
1255 t6 += t5 >> 26; r[ 5] = t5 & 0x3ffffff;
1256 t7 += t6 >> 26; r[ 6] = t6 & 0x3ffffff;
1257 t8 += t7 >> 26; r[ 7] = t7 & 0x3ffffff;
1258 t9 += t8 >> 26; r[ 8] = t8 & 0x3ffffff;
1259 t10 += t9 >> 26; r[ 9] = t9 & 0x3ffffff;
1260 t11 += t10 >> 26; r[10] = t10 & 0x3ffffff;
1261 t12 += t11 >> 26; r[11] = t11 & 0x3ffffff;
1262 t13 += t12 >> 26; r[12] = t12 & 0x3ffffff;
1263 t14 += t13 >> 26; r[13] = t13 & 0x3ffffff;
1264 t15 += t14 >> 26; r[14] = t14 & 0x3ffffff;
1265 t16 += t15 >> 26; r[15] = t15 & 0x3ffffff;
1266 t17 += t16 >> 26; r[16] = t16 & 0x3ffffff;
1267 t18 += t17 >> 26; r[17] = t17 & 0x3ffffff;
1268 r[19] = (sp_digit)(t18 >> 26);
1269 r[18] = t18 & 0x3ffffff;
1270}
1271
1272
1273/* Square the Montgomery form number. (r = a * a mod m)
1274 *
1275 * r Result of squaring.
1276 * a Number to square in Montgomery form.
1277 * m Modulus (prime).
1278 * mp Montgomery multiplier.
1279 */
1280static void sp_256_mont_sqr_10(sp_digit* r, const sp_digit* a, const sp_digit* m,
1281 sp_digit mp)
1282{
1283 sp_256_sqr_10(r, a);
1284 sp_256_mont_reduce_10(r, m, mp);
1285}
1286
1287#if !defined(WOLFSSL_SP_SMALL) || defined(HAVE_COMP_KEY)
1288/* Square the Montgomery form number a number of times. (r = a ^ n mod m)
1289 *
1290 * r Result of squaring.
1291 * a Number to square in Montgomery form.
1292 * n Number of times to square.
1293 * m Modulus (prime).
1294 * mp Montgomery multiplier.
1295 */
1296static void sp_256_mont_sqr_n_10(sp_digit* r, const sp_digit* a, int n,
1297 const sp_digit* m, sp_digit mp)
1298{
1299 sp_256_mont_sqr_10(r, a, m, mp);
1300 for (; n > 1; n--) {
1301 sp_256_mont_sqr_10(r, r, m, mp);
1302 }
1303}
1304
1305#endif /* !WOLFSSL_SP_SMALL || HAVE_COMP_KEY */
1306#ifdef WOLFSSL_SP_SMALL
1307/* Mod-2 for the P256 curve. */
1308static const word32 p256_mod_2[8] = {
1309 0xfffffffdU,0xffffffffU,0xffffffffU,0x00000000U,0x00000000U,0x00000000U,
1310 0x00000001U,0xffffffffU
1311};
1312#endif /* !WOLFSSL_SP_SMALL */
1313
1314/* Invert the number, in Montgomery form, modulo the modulus (prime) of the
1315 * P256 curve. (r = 1 / a mod m)
1316 *
1317 * r Inverse result.
1318 * a Number to invert.
1319 * td Temporary data.
1320 */
1321static void sp_256_mont_inv_10(sp_digit* r, const sp_digit* a, sp_digit* td)
1322{
1323#ifdef WOLFSSL_SP_SMALL
1324 sp_digit* t = td;
1325 int i;
1326
1327 XMEMCPY(t, a, sizeof(sp_digit) * 10);
1328 for (i=254; i>=0; i--) {
1329 sp_256_mont_sqr_10(t, t, p256_mod, p256_mp_mod);
1330 if (p256_mod_2[i / 32] & ((sp_digit)1 << (i % 32)))
1331 sp_256_mont_mul_10(t, t, a, p256_mod, p256_mp_mod);
1332 }
1333 XMEMCPY(r, t, sizeof(sp_digit) * 10);
1334#else
1335 sp_digit* t = td;
1336 sp_digit* t2 = td + Q6_P_mpy_RR(2, 10);
1337 sp_digit* t3 = td + Q6_P_mpy_RR(4, 10);
1338
1339 /* t = a^2 */
1340 sp_256_mont_sqr_10(t, a, p256_mod, p256_mp_mod);
1341 /* t = a^3 = t * a */
1342 sp_256_mont_mul_10(t, t, a, p256_mod, p256_mp_mod);
1343 /* t2= a^c = t ^ 2 ^ 2 */
1344 sp_256_mont_sqr_n_10(t2, t, 2, p256_mod, p256_mp_mod);
1345 /* t3= a^d = t2 * a */
1346 sp_256_mont_mul_10(t3, t2, a, p256_mod, p256_mp_mod);
1347 /* t = a^f = t2 * t */
1348 sp_256_mont_mul_10(t, t2, t, p256_mod, p256_mp_mod);
1349 /* t2= a^f0 = t ^ 2 ^ 4 */
1350 sp_256_mont_sqr_n_10(t2, t, 4, p256_mod, p256_mp_mod);
1351 /* t3= a^fd = t2 * t3 */
1352 sp_256_mont_mul_10(t3, t2, t3, p256_mod, p256_mp_mod);
1353 /* t = a^ff = t2 * t */
1354 sp_256_mont_mul_10(t, t2, t, p256_mod, p256_mp_mod);
1355 /* t2= a^ff00 = t ^ 2 ^ 8 */
1356 sp_256_mont_sqr_n_10(t2, t, 8, p256_mod, p256_mp_mod);
1357 /* t3= a^fffd = t2 * t3 */
1358 sp_256_mont_mul_10(t3, t2, t3, p256_mod, p256_mp_mod);
1359 /* t = a^ffff = t2 * t */
1360 sp_256_mont_mul_10(t, t2, t, p256_mod, p256_mp_mod);
1361 /* t2= a^ffff0000 = t ^ 2 ^ 16 */
1362 sp_256_mont_sqr_n_10(t2, t, 16, p256_mod, p256_mp_mod);
1363 /* t3= a^fffffffd = t2 * t3 */
1364 sp_256_mont_mul_10(t3, t2, t3, p256_mod, p256_mp_mod);
1365 /* t = a^ffffffff = t2 * t */
1366 sp_256_mont_mul_10(t, t2, t, p256_mod, p256_mp_mod);
1367 /* t = a^ffffffff00000000 = t ^ 2 ^ 32 */
1368 sp_256_mont_sqr_n_10(t2, t, 32, p256_mod, p256_mp_mod);
1369 /* t2= a^ffffffffffffffff = t2 * t */
1370 sp_256_mont_mul_10(t, t2, t, p256_mod, p256_mp_mod);
1371 /* t2= a^ffffffff00000001 = t2 * a */
1372 sp_256_mont_mul_10(t2, t2, a, p256_mod, p256_mp_mod);
1373 /* t2= a^ffffffff000000010000000000000000000000000000000000000000
1374 * = t2 ^ 2 ^ 160 */
1375 sp_256_mont_sqr_n_10(t2, t2, 160, p256_mod, p256_mp_mod);
1376 /* t2= a^ffffffff00000001000000000000000000000000ffffffffffffffff
1377 * = t2 * t */
1378 sp_256_mont_mul_10(t2, t2, t, p256_mod, p256_mp_mod);
1379 /* t2= a^ffffffff00000001000000000000000000000000ffffffffffffffff00000000
1380 * = t2 ^ 2 ^ 32 */
1381 sp_256_mont_sqr_n_10(t2, t2, 32, p256_mod, p256_mp_mod);
1382 /* r = a^ffffffff00000001000000000000000000000000fffffffffffffffffffffffd
1383 * = t2 * t3 */
1384 sp_256_mont_mul_10(r, t2, t3, p256_mod, p256_mp_mod);
1385#endif /* WOLFSSL_SP_SMALL */
1386}
1387
1388
1389/* Map the Montgomery form projective coordinate point to an affine point.
1390 *
1391 * r Resulting affine coordinate point.
1392 * p Montgomery form projective coordinate point.
1393 * t Temporary ordinate data.
1394 */
1395static void sp_256_map_10(sp_point* r, const sp_point* p, sp_digit* t)
1396{
1397 sp_digit* t1 = t;
1398 sp_digit* t2 = t + Q6_P_mpy_RR(2, 10);
1399 int32_t n;
1400
1401 sp_256_mont_inv_10(t1, p->z, t + 2*10);
1402
1403 sp_256_mont_sqr_10(t2, t1, p256_mod, p256_mp_mod);
1404 sp_256_mont_mul_10(t1, t2, t1, p256_mod, p256_mp_mod);
1405
1406 /* x /= z^2 */
1407 sp_256_mont_mul_10(r->x, p->x, t2, p256_mod, p256_mp_mod);
1408 XMEMSET(r->x + 10, 0, sizeof(r->x) / 2U);
1409 sp_256_mont_reduce_10(r->x, p256_mod, p256_mp_mod);
1410 /* Reduce x to less than modulus */
1411 n = sp_256_cmp_10(r->x, p256_mod);
1412 sp_256_cond_sub_10(r->x, r->x, p256_mod, 0 - ((n >= 0) ?
1413 (sp_digit)1 : (sp_digit)0));
1414 sp_256_norm_10(r->x);
1415
1416 /* y /= z^3 */
1417 sp_256_mont_mul_10(r->y, p->y, t1, p256_mod, p256_mp_mod);
1418 XMEMSET(r->y + 10, 0, sizeof(r->y) / 2U);
1419 sp_256_mont_reduce_10(r->y, p256_mod, p256_mp_mod);
1420 /* Reduce y to less than modulus */
1421 n = sp_256_cmp_10(r->y, p256_mod);
1422 sp_256_cond_sub_10(r->y, r->y, p256_mod, 0 - ((n >= 0) ?
1423 (sp_digit)1 : (sp_digit)0));
1424 sp_256_norm_10(r->y);
1425
1426 XMEMSET(r->z, 0, sizeof(r->z));
1427 r->z[0] = 1;
1428
1429}
1430
1431
1432/* Add b to a into r. (r = a + b)
1433 *
1434 * r A single precision integer.
1435 * a A single precision integer.
1436 * b A single precision integer.
1437 */
1438SP_NOINLINE static int sp_256_add_10(sp_digit* r, const sp_digit* a,
1439 const sp_digit* b)
1440{
1441#if 0
1442 r[ 0] = Q6_R_add_RR(a[0], b[0]);
1443 r[ 1] = Q6_R_add_RR(a[1], b[1]);
1444 r[ 2] = Q6_R_add_RR(a[2], b[2]);
1445 r[ 3] = Q6_R_add_RR(a[3], b[3]);
1446 r[ 4] = Q6_R_add_RR(a[4], b[4]);
1447 r[ 5] = Q6_R_add_RR(a[5], b[5]);
1448 r[ 6] = Q6_R_add_RR(a[6], b[6]);
1449 r[ 7] = Q6_R_add_RR(a[7], b[7]);
1450 r[ 8] = Q6_R_add_RR(a[8], b[8]);
1451 r[ 9] = Q6_R_add_RR(a[9], b[9]);
1452#endif
1453#if 1
1454 __asm__ __volatile__ (
1455 "{ r1 = memw(%[a]+#0) \n"
1456 " r2 = memw(%[b]+#0) }\n"
1457 "{ r3 = memw(%[a]+#4) \n"
1458 " r19 = add(r1,r2) \n"
1459 " r4 = memw(%[b]+#4) }\n"
1460 "{ r5 = memw(%[a]+#8) \n"
1461 " r20 = add(r3,r4) \n"
1462 " r6 = memw(%[b]+#8) }\n"
1463 "{ memw(%[r]+#0) = r19 }\n"
1464 "{ r7 = memw(%[a]+#12) \n"
1465 " r21 = add(r5,r6) \n"
1466 " r8 = memw(%[b]+#12) }\n"
1467 "{ memw(%[r]+#4) = r20 }\n"
1468 "{ r9 = memw(%[a]+#16) \n"
1469 " r22 = add(r7,r8) \n"
1470 " r10 = memw(%[b]+#16) }\n"
1471 "{ memw(%[r]+#8) = r21 }\n"
1472 "{ r11 = memw(%[a]+#20) \n"
1473 " r23 = add(r9,r10) \n"
1474 " r12 = memw(%[b]+#20) }\n"
1475 "{ memw(%[r]+#12) = r22 }\n"
1476 "{ r13 = memw(%[a]+#24) \n"
1477 " r24 = add(r11,r12) \n"
1478 " r14 = memw(%[b]+#24) }\n"
1479 "{ memw(%[r]+#16) = r23 }\n"
1480 "{ r15 = memw(%[a]+#28) \n"
1481 " r25 = add(r13,r14) \n"
1482 " r16 = memw(%[b]+#28) }\n"
1483 "{ memw(%[r]+#20) = r24 }\n"
1484 "{ r17 = memw(%[a]+#32) \n"
1485 " r26 = add(r15,r16) \n"
1486 " r18 = memw(%[b]+#32) }\n"
1487 "{ memw(%[r]+#24) = r25 }\n"
1488 "{ r5 = memw(%[a]+#36) \n"
1489 " r19 = add(r17,r18) \n"
1490 " r6 = memw(%[b]+#36) }\n"
1491 "{ memw(%[r]+#28) = r26 }\n"
1492 "{ r20 = add(r5,r6) \n"
1493 " memw(%[r]+#32) = r19 }\n"
1494 "{ memw(%[r]+#36) = r20 }\n"
1495 : [r] "+r" (r)
1496 : [a] "r"(a), [b] "r"(b)
1497 : "memory", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", "r24", "r25", "r26"
1498 );
1499#endif
1500 return 0;
1501}
1502
1503
1504/* Add two Montgomery form numbers (r = a + b % m).
1505 *
1506 * r Result of addition.
1507 * a First number to add in Montgomery form.
1508 * b Second number to add in Montgomery form.
1509 * m Modulus (prime).
1510 */
1511static void sp_256_mont_add_10(sp_digit* r, const sp_digit* a, const sp_digit* b,
1512 const sp_digit* m)
1513{
1514 (void)sp_256_add_10(r, a, b);
1515 sp_256_norm_10(r);
1516 sp_256_cond_sub_10(r, r, m, 0 - (((r[9] >> 22) > 0) ?
1517 (sp_digit)1 : (sp_digit)0));
1518 sp_256_norm_10(r);
1519}
1520
1521
1522/* Double a Montgomery form number (r = a + a % m).
1523 *
1524 * r Result of doubling.
1525 * a Number to double in Montgomery form.
1526 * m Modulus (prime).
1527 */
1528static void sp_256_mont_dbl_10(sp_digit* r, const sp_digit* a, const sp_digit* m)
1529{
1530 (void)sp_256_add_10(r, a, a);
1531 sp_256_norm_10(r);
1532 sp_256_cond_sub_10(r, r, m, 0 - (((r[9] >> 22) > 0) ?
1533 (sp_digit)1 : (sp_digit)0));
1534 sp_256_norm_10(r);
1535}
1536
1537
1538/* Triple a Montgomery form number (r = a + a + a % m).
1539 *
1540 * r Result of Tripling.
1541 * a Number to triple in Montgomery form.
1542 * m Modulus (prime).
1543 */
1544static void sp_256_mont_tpl_10(sp_digit* r, const sp_digit* a, const sp_digit* m)
1545{
1546 (void)sp_256_add_10(r, a, a);
1547 sp_256_norm_10(r);
1548 sp_256_cond_sub_10(r, r, m, 0 - (((r[9] >> 22) > 0) ?
1549 (sp_digit)1 : (sp_digit)0));
1550 sp_256_norm_10(r);
1551 (void)sp_256_add_10(r, r, a);
1552 sp_256_norm_10(r);
1553 sp_256_cond_sub_10(r, r, m, 0 - (((r[9] >> 22) > 0) ?
1554 (sp_digit)1 : (sp_digit)0));
1555 sp_256_norm_10(r);
1556}
1557
1558/* Sub b from a into r. (r = a - b)
1559 *
1560 * r A single precision integer.
1561 * a A single precision integer.
1562 * b A single precision integer.
1563 */
1564SP_NOINLINE static int sp_256_sub_10(sp_digit* r, const sp_digit* a,
1565 const sp_digit* b)
1566{
1567#if 0
1568 r[ 0] = Q6_R_sub_RR(a[0], b[0]);
1569 r[ 1] = Q6_R_sub_RR(a[1], b[1]);
1570 r[ 2] = Q6_R_sub_RR(a[2], b[2]);
1571 r[ 3] = Q6_R_sub_RR(a[3], b[3]);
1572 r[ 4] = Q6_R_sub_RR(a[4], b[4]);
1573 r[ 5] = Q6_R_sub_RR(a[5], b[5]);
1574 r[ 6] = Q6_R_sub_RR(a[6], b[6]);
1575 r[ 7] = Q6_R_sub_RR(a[7], b[7]);
1576 r[ 8] = Q6_R_sub_RR(a[8], b[8]);
1577 r[ 9] = Q6_R_sub_RR(a[9], b[9]);
1578#endif
1579#if 1
1580 __asm__ __volatile__ (
1581 "{ r1 = memw(%[a]+#0) \n"
1582 " r2 = memw(%[b]+#0) }\n"
1583 "{ r3 = memw(%[a]+#4) \n"
1584 " r19 = sub(r1,r2) \n"
1585 " r4 = memw(%[b]+#4) }\n"
1586 "{ r5 = memw(%[a]+#8) \n"
1587 " r20 = sub(r3,r4) \n"
1588 " r6 = memw(%[b]+#8) }\n"
1589 "{ memw(%[r]+#0) = r19 }\n"
1590 "{ r7 = memw(%[a]+#12) \n"
1591 " r21 = sub(r5,r6) \n"
1592 " r8 = memw(%[b]+#12) }\n"
1593 "{ memw(%[r]+#4) = r20 }\n"
1594 "{ r9 = memw(%[a]+#16) \n"
1595 " r22 = sub(r7,r8) \n"
1596 " r10 = memw(%[b]+#16) }\n"
1597 "{ memw(%[r]+#8) = r21 }\n"
1598 "{ r11 = memw(%[a]+#20) \n"
1599 " r23 = sub(r9,r10) \n"
1600 " r12 = memw(%[b]+#20) }\n"
1601 "{ memw(%[r]+#12) = r22 }\n"
1602 "{ r13 = memw(%[a]+#24) \n"
1603 " r24 = sub(r11,r12) \n"
1604 " r14 = memw(%[b]+#24) }\n"
1605 "{ memw(%[r]+#16) = r23 }\n"
1606 "{ r15 = memw(%[a]+#28) \n"
1607 " r25 = sub(r13,r14) \n"
1608 " r16 = memw(%[b]+#28) }\n"
1609 "{ memw(%[r]+#20) = r24 }\n"
1610 "{ r17 = memw(%[a]+#32) \n"
1611 " r26 = sub(r15,r16) \n"
1612 " r18 = memw(%[b]+#32) }\n"
1613 "{ memw(%[r]+#24) = r25 }\n"
1614 "{ r5 = memw(%[a]+#36) \n"
1615 " r19 = sub(r17,r18) \n"
1616 " r6 = memw(%[b]+#36) }\n"
1617 "{ memw(%[r]+#28) = r26 }\n"
1618 "{ r20 = sub(r5,r6) \n"
1619 " memw(%[r]+#32) = r19 }\n"
1620 "{ memw(%[r]+#36) = r20 }\n"
1621 : [r] "+r" (r)
1622 : [a] "r"(a), [b] "r"(b)
1623 : "memory", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", "r24", "r25", "r26"
1624 );
1625#endif
1626 return 0;
1627}
1628
1629/* Conditionally add a and b using the mask m.
1630 * m is -1 to add and 0 when not.
1631 *
1632 * r A single precision number representing conditional add result.
1633 * a A single precision number to add with.
1634 * b A single precision number to add.
1635 * m Mask value to apply.
1636 */
1637static void sp_256_cond_add_10(sp_digit* r, const sp_digit* a,
1638 const sp_digit* b, const sp_digit m)
1639{
1640#ifdef WOLFSSL_SP_SMALL
1641 int i;
1642
1643 for (i = 0; i < 10; i++) {
1644 r[i] = a[i] + (b[i] & m);
1645 }
1646#else
1647 r[ 0] = Q6_R_add_RR(a[ 0], Q6_R_and_RR(b[ 0], m));
1648 r[ 1] = Q6_R_add_RR(a[ 1], Q6_R_and_RR(b[ 1], m));
1649 r[ 2] = Q6_R_add_RR(a[ 2], Q6_R_and_RR(b[ 2], m));
1650 r[ 3] = Q6_R_add_RR(a[ 3], Q6_R_and_RR(b[ 3], m));
1651 r[ 4] = Q6_R_add_RR(a[ 4], Q6_R_and_RR(b[ 4], m));
1652 r[ 5] = Q6_R_add_RR(a[ 5], Q6_R_and_RR(b[ 5], m));
1653 r[ 6] = Q6_R_add_RR(a[ 6], Q6_R_and_RR(b[ 6], m));
1654 r[ 7] = Q6_R_add_RR(a[ 7], Q6_R_and_RR(b[ 7], m));
1655 r[ 8] = Q6_R_add_RR(a[ 8], Q6_R_and_RR(b[ 8], m));
1656 r[ 9] = Q6_R_add_RR(a[ 9], Q6_R_and_RR(b[ 9], m));
1657#endif /* WOLFSSL_SP_SMALL */
1658}
1659
1660
1661/* Subtract two Montgomery form numbers (r = a - b % m).
1662 *
1663 * r Result of subtration.
1664 * a Number to subtract from in Montgomery form.
1665 * b Number to subtract with in Montgomery form.
1666 * m Modulus (prime).
1667 */
1668static void sp_256_mont_sub_10(sp_digit* r, const sp_digit* a, const sp_digit* b,
1669 const sp_digit* m)
1670{
1671 (void)sp_256_sub_10(r, a, b);
1672 sp_256_cond_add_10(r, r, m, r[9] >> 22);
1673 sp_256_norm_10(r);
1674}
1675
1676
1677/* Shift number left one bit.
1678 * Bottom bit is lost.
1679 *
1680 * r Result of shift.
1681 * a Number to shift.
1682 */
1683SP_NOINLINE static void sp_256_rshift1_10(sp_digit* r, sp_digit* a)
1684{
1685#ifdef WOLFSSL_SP_SMALL
1686 int i;
1687
1688 for (i=0; i<9; i++) {
1689 r[i] = ((a[i] >> 1) | (a[i + 1] << 25)) & 0x3ffffff;
1690 }
1691#else
1692 r[0] = ((a[0] >> 1) | Q6_R_and_RR((a[1] << 25), 0x3ffffff));
1693 r[1] = ((a[1] >> 1) | Q6_R_and_RR((a[2] << 25), 0x3ffffff));
1694 r[2] = ((a[2] >> 1) | Q6_R_and_RR((a[3] << 25), 0x3ffffff));
1695 r[3] = ((a[3] >> 1) | Q6_R_and_RR((a[4] << 25), 0x3ffffff));
1696 r[4] = ((a[4] >> 1) | Q6_R_and_RR((a[5] << 25), 0x3ffffff));
1697 r[5] = ((a[5] >> 1) | Q6_R_and_RR((a[6] << 25), 0x3ffffff));
1698 r[6] = ((a[6] >> 1) | Q6_R_and_RR((a[7] << 25), 0x3ffffff));
1699 r[7] = ((a[7] >> 1) | Q6_R_and_RR((a[8] << 25), 0x3ffffff));
1700 r[8] = ((a[8] >> 1) | Q6_R_and_RR((a[9] << 25), 0x3ffffff));
1701#endif
1702 r[9] = a[9] >> 1;
1703}
1704
1705
1706/* Divide the number by 2 mod the modulus (prime). (r = a / 2 % m)
1707 *
1708 * r Result of division by 2.
1709 * a Number to divide.
1710 * m Modulus (prime).
1711 */
1712static void sp_256_div2_10(sp_digit* r, const sp_digit* a, const sp_digit* m)
1713{
1714 sp_256_cond_add_10(r, a, m, 0 - (a[0] & 1));
1715 sp_256_norm_10(r);
1716 sp_256_rshift1_10(r, r);
1717}
1718
1719
1720/* Double the Montgomery form projective point p.
1721 *
1722 * r Result of doubling point.
1723 * p Point to double.
1724 * t Temporary ordinate data.
1725 */
1726static void sp_256_proj_point_dbl_10(sp_point* r, const sp_point* p, sp_digit* t)
1727{
1728 sp_point* rp[2];
1729 sp_digit* t1 = t;
1730 sp_digit* t2 = t + 2*10;
1731 sp_digit* x;
1732 sp_digit* y;
1733 sp_digit* z;
1734 int i;
1735
1736 /* When infinity don't double point passed in - constant time. */
1737 rp[0] = r;
1738
1739 /*lint allow cast to different type of pointer*/
1740 rp[1] = (sp_point*)t; /*lint !e9087 !e740*/
1741 XMEMSET(rp[1], 0, sizeof(sp_point));
1742 x = rp[p->infinity]->x;
1743 y = rp[p->infinity]->y;
1744 z = rp[p->infinity]->z;
1745 /* Put point to double into result - good for infinity. */
1746 if (r != p) {
1747 for (i=0; i<10; i++) {
1748 r->x[i] = p->x[i];
1749 }
1750 for (i=0; i<10; i++) {
1751 r->y[i] = p->y[i];
1752 }
1753 for (i=0; i<10; i++) {
1754 r->z[i] = p->z[i];
1755 }
1756 r->infinity = p->infinity;
1757 }
1758
1759 /* T1 = Z * Z */
1760 sp_256_mont_sqr_10(t1, z, p256_mod, p256_mp_mod);
1761 /* Z = Y * Z */
1762 sp_256_mont_mul_10(z, y, z, p256_mod, p256_mp_mod);
1763 /* Z = 2Z */
1764 sp_256_mont_dbl_10(z, z, p256_mod);
1765 /* T2 = X - T1 */
1766 sp_256_mont_sub_10(t2, x, t1, p256_mod);
1767 /* T1 = X + T1 */
1768 sp_256_mont_add_10(t1, x, t1, p256_mod);
1769 /* T2 = T1 * T2 */
1770 sp_256_mont_mul_10(t2, t1, t2, p256_mod, p256_mp_mod);
1771 /* T1 = 3T2 */
1772 sp_256_mont_tpl_10(t1, t2, p256_mod);
1773 /* Y = 2Y */
1774 sp_256_mont_dbl_10(y, y, p256_mod);
1775 /* Y = Y * Y */
1776 sp_256_mont_sqr_10(y, y, p256_mod, p256_mp_mod);
1777 /* T2 = Y * Y */
1778 sp_256_mont_sqr_10(t2, y, p256_mod, p256_mp_mod);
1779 /* T2 = T2/2 */
1780 sp_256_div2_10(t2, t2, p256_mod);
1781 /* Y = Y * X */
1782 sp_256_mont_mul_10(y, y, x, p256_mod, p256_mp_mod);
1783 /* X = T1 * T1 */
1784 sp_256_mont_mul_10(x, t1, t1, p256_mod, p256_mp_mod);
1785 /* X = X - Y */
1786 sp_256_mont_sub_10(x, x, y, p256_mod);
1787 /* X = X - Y */
1788 sp_256_mont_sub_10(x, x, y, p256_mod);
1789 /* Y = Y - X */
1790 sp_256_mont_sub_10(y, y, x, p256_mod);
1791 /* Y = Y * T1 */
1792 sp_256_mont_mul_10(y, y, t1, p256_mod, p256_mp_mod);
1793 /* Y = Y - T2 */
1794 sp_256_mont_sub_10(y, y, t2, p256_mod);
1795
1796}
1797
1798
1799/* Compare two numbers to determine if they are equal.
1800 * Constant time implementation.
1801 *
1802 * a First number to compare.
1803 * b Second number to compare.
1804 * returns 1 when equal and 0 otherwise.
1805 */
1806static int sp_256_cmp_equal_10(const sp_digit* a, const sp_digit* b)
1807{
1808 return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | (a[2] ^ b[2]) | (a[3] ^ b[3]) |
1809 (a[4] ^ b[4]) | (a[5] ^ b[5]) | (a[6] ^ b[6]) | (a[7] ^ b[7]) |
1810 (a[8] ^ b[8]) | (a[9] ^ b[9])) == 0;
1811}
1812
1813/* Add two Montgomery form projective points.
1814 *
1815 * r Result of addition.
1816 * p First point to add.
1817 * q Second point to add.
1818 * t Temporary ordinate data.
1819 */
1820static void sp_256_proj_point_add_10(sp_point* r, const sp_point* p, const sp_point* q,
1821 sp_digit* t)
1822{
1823 const sp_point* ap[2];
1824 sp_point* rp[2];
1825 sp_digit* t1 = t;
1826 sp_digit* t2 = t + 2*10;
1827 sp_digit* t3 = t + 4*10;
1828 sp_digit* t4 = t + 6*10;
1829 sp_digit* t5 = t + 8*10;
1830 sp_digit* x;
1831 sp_digit* y;
1832 sp_digit* z;
1833 int i;
1834
1835 /* Ensure only the first point is the same as the result. */
1836 if (q == r) {
1837 const sp_point* a = p;
1838 p = q;
1839 q = a;
1840 }
1841
1842 /* Check double */
1843 (void)sp_256_sub_10(t1, p256_mod, q->y);
1844 sp_256_norm_10(t1);
1845 if ((sp_256_cmp_equal_10(p->x, q->x) & sp_256_cmp_equal_10(p->z, q->z) &
1846 (sp_256_cmp_equal_10(p->y, q->y) | sp_256_cmp_equal_10(p->y, t1))) != 0) {
1847 sp_256_proj_point_dbl_10(r, p, t);
1848 }
1849 else {
1850 rp[0] = r;
1851
1852 /*lint allow cast to different type of pointer*/
1853 rp[1] = (sp_point*)t; /*lint !e9087 !e740*/
1854 XMEMSET(rp[1], 0, sizeof(sp_point));
1855 x = rp[p->infinity | q->infinity]->x;
1856 y = rp[p->infinity | q->infinity]->y;
1857 z = rp[p->infinity | q->infinity]->z;
1858
1859 ap[0] = p;
1860 ap[1] = q;
1861 for (i=0; i<10; i++) {
1862 r->x[i] = ap[p->infinity]->x[i];
1863 }
1864 for (i=0; i<10; i++) {
1865 r->y[i] = ap[p->infinity]->y[i];
1866 }
1867 for (i=0; i<10; i++) {
1868 r->z[i] = ap[p->infinity]->z[i];
1869 }
1870 r->infinity = ap[p->infinity]->infinity;
1871
1872 /* U1 = X1*Z2^2 */
1873 sp_256_mont_sqr_10(t1, q->z, p256_mod, p256_mp_mod);
1874 sp_256_mont_mul_10(t3, t1, q->z, p256_mod, p256_mp_mod);
1875 sp_256_mont_mul_10(t1, t1, x, p256_mod, p256_mp_mod);
1876 /* U2 = X2*Z1^2 */
1877 sp_256_mont_sqr_10(t2, z, p256_mod, p256_mp_mod);
1878 sp_256_mont_mul_10(t4, t2, z, p256_mod, p256_mp_mod);
1879 sp_256_mont_mul_10(t2, t2, q->x, p256_mod, p256_mp_mod);
1880 /* S1 = Y1*Z2^3 */
1881 sp_256_mont_mul_10(t3, t3, y, p256_mod, p256_mp_mod);
1882 /* S2 = Y2*Z1^3 */
1883 sp_256_mont_mul_10(t4, t4, q->y, p256_mod, p256_mp_mod);
1884 /* H = U2 - U1 */
1885 sp_256_mont_sub_10(t2, t2, t1, p256_mod);
1886 /* R = S2 - S1 */
1887 sp_256_mont_sub_10(t4, t4, t3, p256_mod);
1888 /* Z3 = H*Z1*Z2 */
1889 sp_256_mont_mul_10(z, z, q->z, p256_mod, p256_mp_mod);
1890 sp_256_mont_mul_10(z, z, t2, p256_mod, p256_mp_mod);
1891 /* X3 = R^2 - H^3 - 2*U1*H^2 */
1892 sp_256_mont_sqr_10(x, t4, p256_mod, p256_mp_mod);
1893 sp_256_mont_sqr_10(t5, t2, p256_mod, p256_mp_mod);
1894 sp_256_mont_mul_10(y, t1, t5, p256_mod, p256_mp_mod);
1895 sp_256_mont_mul_10(t5, t5, t2, p256_mod, p256_mp_mod);
1896 sp_256_mont_sub_10(x, x, t5, p256_mod);
1897 sp_256_mont_dbl_10(t1, y, p256_mod);
1898 sp_256_mont_sub_10(x, x, t1, p256_mod);
1899 /* Y3 = R*(U1*H^2 - X3) - S1*H^3 */
1900 sp_256_mont_sub_10(y, y, x, p256_mod);
1901 sp_256_mont_mul_10(y, y, t4, p256_mod, p256_mp_mod);
1902 sp_256_mont_mul_10(t5, t5, t3, p256_mod, p256_mp_mod);
1903 sp_256_mont_sub_10(y, y, t5, p256_mod);
1904 }
1905}
1906
1907#ifdef WOLFSSL_SP_SMALL
1908/* Multiply the point by the scalar and return the result.
1909 * If map is true then convert result to affine coordinates.
1910 *
1911 * r Resulting point.
1912 * g Point to multiply.
1913 * k Scalar to multiply by.
1914 * map Indicates whether to convert result to affine.
1915 * heap Heap to use for allocation.
1916 * returns MEMORY_E when memory allocation fails and MP_OKAY on success.
1917 */
1918static int sp_256_ecc_mulmod_10(sp_point* r, const sp_point* g, const sp_digit* k,
1919 int map, void* heap)
1920{
1921 sp_point* td;
1922 sp_point* t[3];
1923 sp_digit* tmp;
1924 sp_digit n;
1925 int i;
1926 int c, y;
1927 int err = MP_OKAY;
1928
1929 (void)heap;
1930
1931 td = (sp_point*)XMALLOC(sizeof(sp_point) * 3, heap, DYNAMIC_TYPE_ECC);
1932 if (td == NULL)
1933 err = MEMORY_E;
1934 tmp = (sp_digit*)XMALLOC(sizeof(sp_digit) * 2 * 10 * 5, heap,
1935 DYNAMIC_TYPE_ECC);
1936 if (tmp == NULL)
1937 err = MEMORY_E;
1938
1939 if (err == MP_OKAY) {
1940 XMEMSET(td, 0, sizeof(*td) * 3);
1941
1942 t[0] = &td[0];
1943 t[1] = &td[1];
1944 t[2] = &td[2];
1945
1946 /* t[0] = {0, 0, 1} * norm */
1947 t[0]->infinity = 1;
1948 /* t[1] = {g->x, g->y, g->z} * norm */
1949 err = sp_256_mod_mul_norm_10(t[1]->x, g->x, p256_mod);
1950 }
1951 if (err == MP_OKAY)
1952 err = sp_256_mod_mul_norm_10(t[1]->y, g->y, p256_mod);
1953 if (err == MP_OKAY)
1954 err = sp_256_mod_mul_norm_10(t[1]->z, g->z, p256_mod);
1955
1956 if (err == MP_OKAY) {
1957 i = 9;
1958 c = 22;
1959 n = k[i--] << (26 - c);
1960 for (; ; c--) {
1961 if (c == 0) {
1962 if (i == -1)
1963 break;
1964
1965 n = k[i--];
1966 c = 26;
1967 }
1968
1969 y = (n >> 25) & 1;
1970 n <<= 1;
1971
1972 sp_256_proj_point_add_10(t[y^1], t[0], t[1], tmp);
1973
1974 XMEMCPY(t[2], (void*)(((size_t)t[0] & addr_mask[y^1]) +
1975 ((size_t)t[1] & addr_mask[y])),
1976 sizeof(sp_point));
1977 sp_256_proj_point_dbl_10(t[2], t[2], tmp);
1978 XMEMCPY((void*)(((size_t)t[0] & addr_mask[y^1]) +
1979 ((size_t)t[1] & addr_mask[y])), t[2],
1980 sizeof(sp_point));
1981 }
1982
1983 if (map != 0) {
1984 sp_256_map_10(r, t[0], tmp);
1985 }
1986 else {
1987 XMEMCPY(r, t[0], sizeof(sp_point));
1988 }
1989 }
1990
1991 if (tmp != NULL) {
1992 XMEMSET(tmp, 0, sizeof(sp_digit) * 2 * 10 * 5);
1993 XFREE(tmp, NULL, DYNAMIC_TYPE_ECC);
1994 }
1995 if (td != NULL) {
1996 XMEMSET(td, 0, sizeof(sp_point) * 3);
1997 XFREE(td, NULL, DYNAMIC_TYPE_ECC);
1998 }
1999
2000 return err;
2001}
2002
2003#elif !defined(WC_NO_CACHE_RESISTANT)
2004/* Multiply the point by the scalar and return the result.
2005 * If map is true then convert result to affine coordinates.
2006 *
2007 * r Resulting point.
2008 * g Point to multiply.
2009 * k Scalar to multiply by.
2010 * map Indicates whether to convert result to affine.
2011 * heap Heap to use for allocation.
2012 * returns MEMORY_E when memory allocation fails and MP_OKAY on success.
2013 */
2014static int sp_256_ecc_mulmod_10(sp_point* r, const sp_point* g, const sp_digit* k,
2015 int map, void* heap)
2016{
2017#if !defined(WOLFSSL_SP_SMALL) && !defined(WOLFSSL_SMALL_STACK)
2018 sp_point td[3];
2019 sp_digit tmpd[2 * 10 * 5];
2020#endif
2021 sp_point* t;
2022 sp_digit* tmp;
2023 sp_digit n;
2024 int i;
2025 int c, y;
2026 int err = MP_OKAY;
2027
2028 (void)heap;
2029
2030#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
2031 sp_point td[3];
2032 t = (sp_point*)XMALLOC(sizeof(*td) * 3, heap, DYNAMIC_TYPE_ECC);
2033 if (t == NULL)
2034 err = MEMORY_E;
2035 tmp = (sp_digit*)XMALLOC(sizeof(sp_digit) * 2 * 10 * 5, heap,
2036 DYNAMIC_TYPE_ECC);
2037 if (tmp == NULL)
2038 err = MEMORY_E;
2039#else
2040 t = td;
2041 tmp = tmpd;
2042#endif
2043
2044 if (err == MP_OKAY) {
2045 t[0] = &td[0];
2046 t[1] = &td[1];
2047 t[2] = &td[2];
2048
2049 /* t[0] = {0, 0, 1} * norm */
2050 XMEMSET(&t[0], 0, sizeof(t[0]));
2051 t[0].infinity = 1;
2052 /* t[1] = {g->x, g->y, g->z} * norm */
2053 err = sp_256_mod_mul_norm_10(t[1].x, g->x, p256_mod);
2054 }
2055 if (err == MP_OKAY)
2056 err = sp_256_mod_mul_norm_10(t[1].y, g->y, p256_mod);
2057 if (err == MP_OKAY)
2058 err = sp_256_mod_mul_norm_10(t[1].z, g->z, p256_mod);
2059
2060 if (err == MP_OKAY) {
2061 i = 9;
2062 c = 22;
2063 n = k[i--] << (26 - c);
2064 for (; ; c--) {
2065 if (c == 0) {
2066 if (i == -1)
2067 break;
2068
2069 n = k[i--];
2070 c = 26;
2071 }
2072
2073 y = (n >> 25) & 1;
2074 n <<= 1;
2075
2076 sp_256_proj_point_add_10(&t[y^1], &t[0], &t[1], tmp);
2077
2078 XMEMCPY(&t[2], (void*)(((size_t)&t[0] & addr_mask[y^1]) +
2079 ((size_t)&t[1] & addr_mask[y])), sizeof(t[2]));
2080 sp_256_proj_point_dbl_10(&t[2], &t[2], tmp);
2081 XMEMCPY((void*)(((size_t)&t[0] & addr_mask[y^1]) +
2082 ((size_t)&t[1] & addr_mask[y])), &t[2], sizeof(t[2]));
2083 }
2084
2085 if (map != 0) {
2086 sp_256_map_10(r, &t[0], tmp);
2087 }
2088 else {
2089 XMEMCPY(r, &t[0], sizeof(sp_point));
2090 }
2091 }
2092
2093#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
2094 if (tmp != NULL) {
2095 XMEMSET(tmp, 0, sizeof(sp_digit) * 2 * 10 * 5);
2096 XFREE(tmp, heap, DYNAMIC_TYPE_ECC);
2097 }
2098 if (t != NULL) {
2099 XMEMSET(t, 0, sizeof(sp_point) * 3);
2100 XFREE(t, heap, DYNAMIC_TYPE_ECC);
2101 }
2102#else
2103 ForceZero(tmpd, sizeof(tmpd));
2104 ForceZero(td, sizeof(td));
2105#endif
2106
2107 return err;
2108}
2109
2110#else
2111/* A table entry for pre-computed points. */
2112typedef struct sp_table_entry {
2113 sp_digit x[10] __attribute__((aligned(128)));
2114 sp_digit y[10] __attribute__((aligned(128)));
2115} sp_table_entry;
2116
2117/* Multiply the point by the scalar and return the result.
2118 * If map is true then convert result to affine coordinates.
2119 *
2120 * r Resulting point.
2121 * g Point to multiply.
2122 * k Scalar to multiply by.
2123 * map Indicates whether to convert result to affine.
2124 * heap Heap to use for allocation.
2125 * returns MEMORY_E when memory allocation fails and MP_OKAY on success.
2126 */
2127static int sp_256_ecc_mulmod_fast_10(sp_point* r, const sp_point* g, const sp_digit* k,
2128 int map, void* heap)
2129{
2130#if !defined(WOLFSSL_SP_SMALL) && !defined(WOLFSSL_SMALL_STACK)
2131 sp_point td[16];
2132 sp_point rtd;
2133 sp_digit tmpd[2 * 10 * 5];
2134#endif
2135 sp_point* t;
2136 sp_point* rt;
2137 sp_digit* tmp;
2138 sp_digit n;
2139 int i;
2140 int c, y;
2141 int err;
2142
2143 (void)heap;
2144
2145 err = sp_ecc_point_new(heap, rtd, rt);
2146#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
2147 t = (sp_point*)XMALLOC(sizeof(sp_point) * 16, heap, DYNAMIC_TYPE_ECC);
2148 if (t == NULL)
2149 err = MEMORY_E;
2150 tmp = (sp_digit*)XMALLOC(sizeof(sp_digit) * 2 * 10 * 5, heap,
2151 DYNAMIC_TYPE_ECC);
2152 if (tmp == NULL)
2153 err = MEMORY_E;
2154#else
2155 t = td;
2156 tmp = tmpd;
2157#endif
2158
2159 if (err == MP_OKAY) {
2160 /* t[0] = {0, 0, 1} * norm */
2161 XMEMSET(&t[0], 0, sizeof(t[0]));
2162 t[0].infinity = 1;
2163 /* t[1] = {g->x, g->y, g->z} * norm */
2164 (void)sp_256_mod_mul_norm_10(t[1].x, g->x, p256_mod);
2165 (void)sp_256_mod_mul_norm_10(t[1].y, g->y, p256_mod);
2166 (void)sp_256_mod_mul_norm_10(t[1].z, g->z, p256_mod);
2167 t[1].infinity = 0;
2168 sp_256_proj_point_dbl_10(&t[ 2], &t[ 1], tmp);
2169 t[ 2].infinity = 0;
2170 sp_256_proj_point_add_10(&t[ 3], &t[ 2], &t[ 1], tmp);
2171 t[ 3].infinity = 0;
2172 sp_256_proj_point_dbl_10(&t[ 4], &t[ 2], tmp);
2173 t[ 4].infinity = 0;
2174 sp_256_proj_point_add_10(&t[ 5], &t[ 3], &t[ 2], tmp);
2175 t[ 5].infinity = 0;
2176 sp_256_proj_point_dbl_10(&t[ 6], &t[ 3], tmp);
2177 t[ 6].infinity = 0;
2178 sp_256_proj_point_add_10(&t[ 7], &t[ 4], &t[ 3], tmp);
2179 t[ 7].infinity = 0;
2180 sp_256_proj_point_dbl_10(&t[ 8], &t[ 4], tmp);
2181 t[ 8].infinity = 0;
2182 sp_256_proj_point_add_10(&t[ 9], &t[ 5], &t[ 4], tmp);
2183 t[ 9].infinity = 0;
2184 sp_256_proj_point_dbl_10(&t[10], &t[ 5], tmp);
2185 t[10].infinity = 0;
2186 sp_256_proj_point_add_10(&t[11], &t[ 6], &t[ 5], tmp);
2187 t[11].infinity = 0;
2188 sp_256_proj_point_dbl_10(&t[12], &t[ 6], tmp);
2189 t[12].infinity = 0;
2190 sp_256_proj_point_add_10(&t[13], &t[ 7], &t[ 6], tmp);
2191 t[13].infinity = 0;
2192 sp_256_proj_point_dbl_10(&t[14], &t[ 7], tmp);
2193 t[14].infinity = 0;
2194 sp_256_proj_point_add_10(&t[15], &t[ 8], &t[ 7], tmp);
2195 t[15].infinity = 0;
2196
2197 i = 8;
2198 n = k[i+1] << 6;
2199 c = 18;
2200 y = n >> 24;
2201 XMEMCPY(rt, &t[y], sizeof(sp_point));
2202 n <<= 8;
2203 for (; i>=0 || c>=4; ) {
2204 if (c < 4) {
2205 n |= k[i--] << (6 - c);
2206 c += 26;
2207 }
2208 y = (n >> 28) & 0xf;
2209 n <<= 4;
2210 c -= 4;
2211
2212 sp_256_proj_point_dbl_10(rt, rt, tmp);
2213 sp_256_proj_point_dbl_10(rt, rt, tmp);
2214 sp_256_proj_point_dbl_10(rt, rt, tmp);
2215 sp_256_proj_point_dbl_10(rt, rt, tmp);
2216
2217 sp_256_proj_point_add_10(rt, rt, &t[y], tmp);
2218 }
2219
2220 if (map != 0) {
2221 sp_256_map_10(r, rt, tmp);
2222 }
2223 else {
2224 XMEMCPY(r, rt, sizeof(sp_point));
2225 }
2226 }
2227
2228#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
2229 if (tmp != NULL) {
2230 XMEMSET(tmp, 0, sizeof(sp_digit) * 2 * 10 * 5);
2231 XFREE(tmp, heap, DYNAMIC_TYPE_ECC);
2232 }
2233 if (t != NULL) {
2234 XMEMSET(t, 0, sizeof(sp_point) * 16);
2235 XFREE(t, heap, DYNAMIC_TYPE_ECC);
2236 }
2237#else
2238 ForceZero(tmpd, sizeof(tmpd));
2239 ForceZero(td, sizeof(td));
2240#endif
2241 sp_ecc_point_free(rt, 1, heap);
2242
2243 return err;
2244}
2245
2246#ifdef FP_ECC
2247/* Double the Montgomery form projective point p a number of times.
2248 *
2249 * r Result of repeated doubling of point.
2250 * p Point to double.
2251 * n Number of times to double
2252 * t Temporary ordinate data.
2253 */
2254static void sp_256_proj_point_dbl_n_10(sp_point* r, const sp_point* p, int n,
2255 sp_digit* t)
2256{
2257 sp_point* rp[2];
2258 sp_digit* w = t;
2259 sp_digit* a = t + 2*10;
2260 sp_digit* b = t + 4*10;
2261 sp_digit* t1 = t + 6*10;
2262 sp_digit* t2 = t + 8*10;
2263 sp_digit* x;
2264 sp_digit* y;
2265 sp_digit* z;
2266 int i;
2267
2268 rp[0] = r;
2269
2270 /*lint allow cast to different type of pointer*/
2271 rp[1] = (sp_point*)t; /*lint !e9087 !e740*/
2272 XMEMSET(rp[1], 0, sizeof(sp_point));
2273 x = rp[p->infinity]->x;
2274 y = rp[p->infinity]->y;
2275 z = rp[p->infinity]->z;
2276 if (r != p) {
2277 for (i=0; i<10; i++) {
2278 r->x[i] = p->x[i];
2279 }
2280 for (i=0; i<10; i++) {
2281 r->y[i] = p->y[i];
2282 }
2283 for (i=0; i<10; i++) {
2284 r->z[i] = p->z[i];
2285 }
2286 r->infinity = p->infinity;
2287 }
2288
2289 /* Y = 2*Y */
2290 sp_256_mont_dbl_10(y, y, p256_mod);
2291 /* W = Z^4 */
2292 sp_256_mont_sqr_10(w, z, p256_mod, p256_mp_mod);
2293 sp_256_mont_sqr_10(w, w, p256_mod, p256_mp_mod);
2294 while (n-- > 0) {
2295 /* A = 3*(X^2 - W) */
2296 sp_256_mont_sqr_10(t1, x, p256_mod, p256_mp_mod);
2297 sp_256_mont_sub_10(t1, t1, w, p256_mod);
2298 sp_256_mont_tpl_10(a, t1, p256_mod);
2299 /* B = X*Y^2 */
2300 sp_256_mont_sqr_10(t2, y, p256_mod, p256_mp_mod);
2301 sp_256_mont_mul_10(b, t2, x, p256_mod, p256_mp_mod);
2302 /* X = A^2 - 2B */
2303 sp_256_mont_sqr_10(x, a, p256_mod, p256_mp_mod);
2304 sp_256_mont_dbl_10(t1, b, p256_mod);
2305 sp_256_mont_sub_10(x, x, t1, p256_mod);
2306 /* Z = Z*Y */
2307 sp_256_mont_mul_10(z, z, y, p256_mod, p256_mp_mod);
2308 /* t2 = Y^4 */
2309 sp_256_mont_sqr_10(t2, t2, p256_mod, p256_mp_mod);
2310 if (n != 0) {
2311 /* W = W*Y^4 */
2312 sp_256_mont_mul_10(w, w, t2, p256_mod, p256_mp_mod);
2313 }
2314 /* y = 2*A*(B - X) - Y^4 */
2315 sp_256_mont_sub_10(y, b, x, p256_mod);
2316 sp_256_mont_mul_10(y, y, a, p256_mod, p256_mp_mod);
2317 sp_256_mont_dbl_10(y, y, p256_mod);
2318 sp_256_mont_sub_10(y, y, t2, p256_mod);
2319 }
2320 /* Y = Y/2 */
2321 sp_256_div2_10(y, y, p256_mod);
2322}
2323
2324#endif /* FP_ECC */
2325
2326
2327/* Add two Montgomery form projective points. The second point has a q value of
2328 * one.
2329 * Only the first point can be the same pointer as the result point.
2330 *
2331 * r Result of addition.
2332 * p First point to add.
2333 * q Second point to add.
2334 * t Temporary ordinate data.
2335 */
2336static void sp_256_proj_point_add_qz1_10(sp_point* r, const sp_point* p,
2337 const sp_point* q, sp_digit* t)
2338{
2339 const sp_point* ap[2];
2340 sp_point* rp[2];
2341 sp_digit* t1 = t;
2342 sp_digit* t2 = t + 2*10;
2343 sp_digit* t3 = t + 4*10;
2344 sp_digit* t4 = t + 6*10;
2345 sp_digit* t5 = t + 8*10;
2346 sp_digit* x;
2347 sp_digit* y;
2348 sp_digit* z;
2349 int i;
2350
2351 /* Check double */
2352 (void)sp_256_sub_10(t1, p256_mod, q->y);
2353 sp_256_norm_10(t1);
2354 if ((sp_256_cmp_equal_10(p->x, q->x) & sp_256_cmp_equal_10(p->z, q->z) &
2355 (sp_256_cmp_equal_10(p->y, q->y) | sp_256_cmp_equal_10(p->y, t1))) != 0) {
2356 sp_256_proj_point_dbl_10(r, p, t);
2357 }
2358 else {
2359 rp[0] = r;
2360
2361 /*lint allow cast to different type of pointer*/
2362 rp[1] = (sp_point*)t; /*lint !e9087 !e740*/
2363 XMEMSET(rp[1], 0, sizeof(sp_point));
2364 x = rp[p->infinity | q->infinity]->x;
2365 y = rp[p->infinity | q->infinity]->y;
2366 z = rp[p->infinity | q->infinity]->z;
2367
2368 ap[0] = p;
2369 ap[1] = q;
2370 for (i=0; i<10; i++) {
2371 r->x[i] = ap[p->infinity]->x[i];
2372 }
2373 for (i=0; i<10; i++) {
2374 r->y[i] = ap[p->infinity]->y[i];
2375 }
2376 for (i=0; i<10; i++) {
2377 r->z[i] = ap[p->infinity]->z[i];
2378 }
2379 r->infinity = ap[p->infinity]->infinity;
2380
2381 /* U2 = X2*Z1^2 */
2382 sp_256_mont_sqr_10(t2, z, p256_mod, p256_mp_mod);
2383 sp_256_mont_mul_10(t4, t2, z, p256_mod, p256_mp_mod);
2384 sp_256_mont_mul_10(t2, t2, q->x, p256_mod, p256_mp_mod);
2385 /* S2 = Y2*Z1^3 */
2386 sp_256_mont_mul_10(t4, t4, q->y, p256_mod, p256_mp_mod);
2387 /* H = U2 - X1 */
2388 sp_256_mont_sub_10(t2, t2, x, p256_mod);
2389 /* R = S2 - Y1 */
2390 sp_256_mont_sub_10(t4, t4, y, p256_mod);
2391 /* Z3 = H*Z1 */
2392 sp_256_mont_mul_10(z, z, t2, p256_mod, p256_mp_mod);
2393 /* X3 = R^2 - H^3 - 2*X1*H^2 */
2394 sp_256_mont_sqr_10(t1, t4, p256_mod, p256_mp_mod);
2395 sp_256_mont_sqr_10(t5, t2, p256_mod, p256_mp_mod);
2396 sp_256_mont_mul_10(t3, x, t5, p256_mod, p256_mp_mod);
2397 sp_256_mont_mul_10(t5, t5, t2, p256_mod, p256_mp_mod);
2398 sp_256_mont_sub_10(x, t1, t5, p256_mod);
2399 sp_256_mont_dbl_10(t1, t3, p256_mod);
2400 sp_256_mont_sub_10(x, x, t1, p256_mod);
2401 /* Y3 = R*(X1*H^2 - X3) - Y1*H^3 */
2402 sp_256_mont_sub_10(t3, t3, x, p256_mod);
2403 sp_256_mont_mul_10(t3, t3, t4, p256_mod, p256_mp_mod);
2404 sp_256_mont_mul_10(t5, t5, y, p256_mod, p256_mp_mod);
2405 sp_256_mont_sub_10(y, t3, t5, p256_mod);
2406 }
2407}
2408
2409#ifdef FP_ECC
2410/* Convert the projective point to affine.
2411 * Ordinates are in Montgomery form.
2412 *
2413 * a Point to convert.
2414 * t Temporary data.
2415 */
2416static void sp_256_proj_to_affine_10(sp_point* a, sp_digit* t)
2417{
2418 sp_digit* t1 = t;
2419 sp_digit* t2 = t + 2 * 10;
2420 sp_digit* tmp = t + 4 * 10;
2421
2422 sp_256_mont_inv_10(t1, a->z, tmp);
2423
2424 sp_256_mont_sqr_10(t2, t1, p256_mod, p256_mp_mod);
2425 sp_256_mont_mul_10(t1, t2, t1, p256_mod, p256_mp_mod);
2426
2427 sp_256_mont_mul_10(a->x, a->x, t2, p256_mod, p256_mp_mod);
2428 sp_256_mont_mul_10(a->y, a->y, t1, p256_mod, p256_mp_mod);
2429 XMEMCPY(a->z, p256_norm_mod, sizeof(p256_norm_mod));
2430}
2431
2432
2433/* Generate the pre-computed table of points for the base point.
2434 *
2435 * a The base point.
2436 * table Place to store generated point data.
2437 * tmp Temporary data.
2438 * heap Heap to use for allocation.
2439 */
2440static int sp_256_gen_stripe_table_10(const sp_point* a,
2441 sp_table_entry* table, sp_digit* tmp, void* heap)
2442{
2443#if !defined(WOLFSSL_SP_SMALL) && !defined(WOLFSSL_SMALL_STACK)
2444 sp_point td, s1d, s2d;
2445#endif
2446 sp_point* t;
2447 sp_point* s1 = NULL;
2448 sp_point* s2 = NULL;
2449 int i, j;
2450 int err;
2451
2452 (void)heap;
2453
2454 err = sp_ecc_point_new(heap, td, t);
2455 if (err == MP_OKAY) {
2456 err = sp_ecc_point_new(heap, s1d, s1);
2457 }
2458 if (err == MP_OKAY) {
2459 err = sp_ecc_point_new(heap, s2d, s2);
2460 }
2461
2462 if (err == MP_OKAY) {
2463 err = sp_256_mod_mul_norm_10(t->x, a->x, p256_mod);
2464 }
2465 if (err == MP_OKAY) {
2466 err = sp_256_mod_mul_norm_10(t->y, a->y, p256_mod);
2467 }
2468 if (err == MP_OKAY) {
2469 err = sp_256_mod_mul_norm_10(t->z, a->z, p256_mod);
2470 }
2471 if (err == MP_OKAY) {
2472 t->infinity = 0;
2473 sp_256_proj_to_affine_10(t, tmp);
2474
2475 XMEMCPY(s1->z, p256_norm_mod, sizeof(p256_norm_mod));
2476 s1->infinity = 0;
2477 XMEMCPY(s2->z, p256_norm_mod, sizeof(p256_norm_mod));
2478 s2->infinity = 0;
2479
2480 /* table[0] = {0, 0, infinity} */
2481 XMEMSET(&table[0], 0, sizeof(sp_table_entry));
2482 /* table[1] = Affine version of 'a' in Montgomery form */
2483 XMEMCPY(table[1].x, t->x, sizeof(table->x));
2484 XMEMCPY(table[1].y, t->y, sizeof(table->y));
2485
2486 for (i=1; i<8; i++) {
2487 sp_256_proj_point_dbl_n_10(t, t, 32, tmp);
2488 sp_256_proj_to_affine_10(t, tmp);
2489 XMEMCPY(table[1<<i].x, t->x, sizeof(table->x));
2490 XMEMCPY(table[1<<i].y, t->y, sizeof(table->y));
2491 }
2492
2493 for (i=1; i<8; i++) {
2494 XMEMCPY(s1->x, table[1<<i].x, sizeof(table->x));
2495 XMEMCPY(s1->y, table[1<<i].y, sizeof(table->y));
2496 for (j=(1<<i)+1; j<(1<<(i+1)); j++) {
2497 XMEMCPY(s2->x, table[j-(1<<i)].x, sizeof(table->x));
2498 XMEMCPY(s2->y, table[j-(1<<i)].y, sizeof(table->y));
2499 sp_256_proj_point_add_qz1_10(t, s1, s2, tmp);
2500 sp_256_proj_to_affine_10(t, tmp);
2501 XMEMCPY(table[j].x, t->x, sizeof(table->x));
2502 XMEMCPY(table[j].y, t->y, sizeof(table->y));
2503 }
2504 }
2505 }
2506
2507 sp_ecc_point_free(s2, 0, heap);
2508 sp_ecc_point_free(s1, 0, heap);
2509 sp_ecc_point_free( t, 0, heap);
2510
2511 return err;
2512}
2513
2514#endif /* FP_ECC */
2515/* Multiply the point by the scalar and return the result.
2516 * If map is true then convert result to affine coordinates.
2517 *
2518 * r Resulting point.
2519 * k Scalar to multiply by.
2520 * map Indicates whether to convert result to affine.
2521 * heap Heap to use for allocation.
2522 * returns MEMORY_E when memory allocation fails and MP_OKAY on success.
2523 */
2524static int sp_256_ecc_mulmod_stripe_10(sp_point* r, const sp_point* g,
2525 const sp_table_entry* table, const sp_digit* k, int map, void* heap)
2526{
2527#if !defined(WOLFSSL_SP_SMALL) && !defined(WOLFSSL_SMALL_STACK)
2528 sp_point rtd;
2529 sp_point pd;
2530 sp_digit td[2 * 10 * 5];
2531#endif
2532 sp_point* rt;
2533 sp_point* p = NULL;
2534 sp_digit* t;
2535 int i, j;
2536 int y, x;
2537 int err;
2538
2539 (void)g;
2540 (void)heap;
2541
2542 err = sp_ecc_point_new(heap, rtd, rt);
2543 if (err == MP_OKAY) {
2544 err = sp_ecc_point_new(heap, pd, p);
2545 }
2546#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
2547 t = (sp_digit*)XMALLOC(sizeof(sp_digit) * 2 * 10 * 5, heap,
2548 DYNAMIC_TYPE_ECC);
2549 if (t == NULL) {
2550 err = MEMORY_E;
2551 }
2552#else
2553 t = td;
2554#endif
2555
2556 if (err == MP_OKAY) {
2557 XMEMCPY(p->z, p256_norm_mod, sizeof(p256_norm_mod));
2558 XMEMCPY(rt->z, p256_norm_mod, sizeof(p256_norm_mod));
2559
2560 y = 0;
2561 for (j=0,x=31; j<8; j++,x+=32) {
2562 y |= ((k[x / 26] >> (x % 26)) & 1) << j;
2563 }
2564 XMEMCPY(rt->x, table[y].x, sizeof(table[y].x));
2565 XMEMCPY(rt->y, table[y].y, sizeof(table[y].y));
2566 rt->infinity = !y;
2567 for (i=30; i>=0; i--) {
2568 y = 0;
2569 for (j=0,x=i; j<8; j++,x+=32) {
2570 y |= ((k[x / 26] >> (x % 26)) & 1) << j;
2571 }
2572
2573 sp_256_proj_point_dbl_10(rt, rt, t);
2574 XMEMCPY(p->x, table[y].x, sizeof(table[y].x));
2575 XMEMCPY(p->y, table[y].y, sizeof(table[y].y));
2576 p->infinity = !y;
2577 sp_256_proj_point_add_qz1_10(rt, rt, p, t);
2578 }
2579
2580 if (map != 0) {
2581 sp_256_map_10(r, rt, t);
2582 }
2583 else {
2584 XMEMCPY(r, rt, sizeof(sp_point));
2585 }
2586 }
2587
2588#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
2589 XFREE(t, heap, DYNAMIC_TYPE_ECC);
2590#endif
2591 sp_ecc_point_free(p, 0, heap);
2592 sp_ecc_point_free(rt, 0, heap);
2593
2594 return err;
2595}
2596
2597#ifdef FP_ECC
2598#ifndef FP_ENTRIES
2599 #define FP_ENTRIES 16
2600#endif
2601
2602typedef struct sp_cache_t {
2603 sp_digit x[10] __attribute__((aligned(128)));
2604 sp_digit y[10] __attribute__((aligned(128)));
2605 sp_table_entry table[256] __attribute__((aligned(128)));
2606 word32 cnt;
2607 int set;
2608} sp_cache_t;
2609
2610static THREAD_LS_T sp_cache_t sp_cache[FP_ENTRIES];
2611static THREAD_LS_T int sp_cache_last = -1;
2612static THREAD_LS_T int sp_cache_inited = 0;
2613
2614#ifndef HAVE_THREAD_LS
2615 static wolfSSL_Mutex sp_cache_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_lock);
2616#ifdef WOLFSSL_MUTEX_INITIALIZER
2617 static volatile int initCacheMutex = 0;
2618#endif
2619#endif
2620
2621static void sp_ecc_get_cache(const sp_point* g, sp_cache_t** cache)
2622{
2623 int i, j;
2624 word32 least;
2625
2626 if (sp_cache_inited == 0) {
2627 for (i=0; i<FP_ENTRIES; i++) {
2628 sp_cache[i].set = 0;
2629 }
2630 sp_cache_inited = 1;
2631 }
2632
2633 /* Compare point with those in cache. */
2634 for (i=0; i<FP_ENTRIES; i++) {
2635 if (!sp_cache[i].set)
2636 continue;
2637
2638 if (sp_256_cmp_equal_10(g->x, sp_cache[i].x) &
2639 sp_256_cmp_equal_10(g->y, sp_cache[i].y)) {
2640 sp_cache[i].cnt++;
2641 break;
2642 }
2643 }
2644
2645 /* No match. */
2646 if (i == FP_ENTRIES) {
2647 /* Find empty entry. */
2648 i = (sp_cache_last + 1) % FP_ENTRIES;
2649 for (; i != sp_cache_last; i=(i+1)%FP_ENTRIES) {
2650 if (!sp_cache[i].set) {
2651 break;
2652 }
2653 }
2654
2655 /* Evict least used. */
2656 if (i == sp_cache_last) {
2657 least = sp_cache[0].cnt;
2658 for (j=1; j<FP_ENTRIES; j++) {
2659 if (sp_cache[j].cnt < least) {
2660 i = j;
2661 least = sp_cache[i].cnt;
2662 }
2663 }
2664 }
2665
2666 XMEMCPY(sp_cache[i].x, g->x, sizeof(sp_cache[i].x));
2667 XMEMCPY(sp_cache[i].y, g->y, sizeof(sp_cache[i].y));
2668 sp_cache[i].set = 1;
2669 sp_cache[i].cnt = 1;
2670 }
2671
2672 *cache = &sp_cache[i];
2673 sp_cache_last = i;
2674}
2675#endif /* FP_ECC */
2676
2677/* Multiply the base point of P256 by the scalar and return the result.
2678 * If map is true then convert result to affine coordinates.
2679 *
2680 * r Resulting point.
2681 * g Point to multiply.
2682 * k Scalar to multiply by.
2683 * map Indicates whether to convert result to affine.
2684 * heap Heap to use for allocation.
2685 * returns MEMORY_E when memory allocation fails and MP_OKAY on success.
2686 */
2687static int sp_256_ecc_mulmod_10(sp_point* r, const sp_point* g, const sp_digit* k,
2688 int map, void* heap)
2689{
2690#ifndef FP_ECC
2691 return sp_256_ecc_mulmod_fast_10(r, g, k, map, heap);
2692#else
2693 sp_digit tmp[2 * 10 * 5];
2694 sp_cache_t* cache;
2695 int err = MP_OKAY;
2696
2697#ifndef HAVE_THREAD_LS
2698#ifndef WOLFSSL_MUTEX_INITIALIZER
2699 if (initCacheMutex == 0) {
2700 wc_InitMutex(&sp_cache_lock);
2701 initCacheMutex = 1;
2702 }
2703#endif
2704 if (wc_LockMutex(&sp_cache_lock) != 0)
2705 err = BAD_MUTEX_E;
2706#endif /* HAVE_THREAD_LS */
2707
2708 if (err == MP_OKAY) {
2709 sp_ecc_get_cache(g, &cache);
2710 if (cache->cnt == 2)
2711 sp_256_gen_stripe_table_10(g, cache->table, tmp, heap);
2712
2713 if (cache->cnt < 2) {
2714 err = sp_256_ecc_mulmod_fast_10(r, g, k, map, heap);
2715 }
2716 else {
2717 err = sp_256_ecc_mulmod_stripe_10(r, g, cache->table, k,
2718 map, heap);
2719 }
2720#ifndef HAVE_THREAD_LS
2721 wc_UnLockMutex(&sp_cache_lock);
2722#endif /* HAVE_THREAD_LS */
2723 }
2724
2725 return err;
2726#endif
2727}
2728
2729#endif
2730
2731#ifdef WOLFSSL_SP_SMALL
2732/* Multiply the base point of P256 by the scalar and return the result.
2733 * If map is true then convert result to affine coordinates.
2734 *
2735 * r Resulting point.
2736 * k Scalar to multiply by.
2737 * map Indicates whether to convert result to affine.
2738 * heap Heap to use for allocation.
2739 * returns MEMORY_E when memory allocation fails and MP_OKAY on success.
2740 */
2741static int sp_256_ecc_mulmod_base_10(sp_point* r, const sp_digit* k,
2742 int map, void* heap)
2743{
2744 /* No pre-computed values. */
2745 return sp_256_ecc_mulmod_10(r, &p256_base, k, map, heap);
2746}
2747
2748#else
2749static const sp_table_entry p256_table[256] = {
2750 /* 0 */
2751 { { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
2752 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } },
2753 /* 1 */
2754 { { 0x0a9143c,0x1cc3506,0x360179e,0x3f17fb6,0x075ba95,0x1d88944,
2755 0x3b732b7,0x15719e7,0x376a537,0x0062417 },
2756 { 0x295560a,0x094d5f3,0x245cddf,0x392e867,0x18b4ab8,0x3487cc9,
2757 0x288688d,0x176174b,0x3182588,0x0215c7f } },
2758 /* 2 */
2759 { { 0x147519a,0x2218090,0x32f0202,0x2b09acd,0x0d0981e,0x1e17af2,
2760 0x14a7caa,0x163a6a7,0x10ddbdf,0x03654f1 },
2761 { 0x1590f8f,0x0d8733f,0x09179d6,0x1ad139b,0x372e962,0x0bad933,
2762 0x1961102,0x223cdff,0x37e9eb2,0x0218fae } },
2763 /* 3 */
2764 { { 0x0db6485,0x1ad88d7,0x2f97785,0x288bc28,0x3808f0e,0x3df8c02,
2765 0x28d9544,0x20280f9,0x055b5ff,0x00001d8 },
2766 { 0x38d2010,0x13ae6e0,0x308a763,0x2ecc90d,0x254014f,0x10a9981,
2767 0x247d398,0x0fb8383,0x3613437,0x020c21d } },
2768 /* 4 */
2769 { { 0x2a0d2bb,0x08bf145,0x34994f9,0x1b06988,0x30d5cc1,0x1f18b22,
2770 0x01cf3a5,0x199fe49,0x161fd1b,0x00bd79a },
2771 { 0x1a01797,0x171c2fd,0x21925c1,0x1358255,0x23d20b4,0x1c7f6d4,
2772 0x111b370,0x03dec12,0x1168d6f,0x03d923e } },
2773 /* 5 */
2774 { { 0x137bbbc,0x19a11f8,0x0bec9e5,0x27a29a8,0x3e43446,0x275cd18,
2775 0x0427617,0x00056c7,0x285133d,0x016af80 },
2776 { 0x04c7dab,0x2a0df30,0x0c0792a,0x1310c98,0x3573d9f,0x239b30d,
2777 0x1315627,0x1ce0c32,0x25b6b6f,0x0252edc } },
2778 /* 6 */
2779 { { 0x20f141c,0x26d23dc,0x3c74bbf,0x334b7d6,0x06199b3,0x0441171,
2780 0x3f61294,0x313bf70,0x3cb2f7d,0x03375ae },
2781 { 0x2f436fd,0x19c02fa,0x26becca,0x1b6e64c,0x26f647f,0x053c948,
2782 0x0fa7920,0x397d830,0x2bd4bda,0x028d86f } },
2783 /* 7 */
2784 { { 0x17c13c7,0x2895616,0x03e128a,0x17d42df,0x1c38d63,0x0f02747,
2785 0x039aecf,0x0a4b01c,0x209c4b5,0x02e84b2 },
2786 { 0x1f91dfd,0x023e916,0x07fb9e4,0x19b3ba8,0x13af43b,0x35e02ca,
2787 0x0eb0899,0x3bd2c7b,0x19d701f,0x014faee } },
2788 /* 8 */
2789 { { 0x0e63d34,0x1fb8c6c,0x0fab4fe,0x1caa795,0x0f46005,0x179ed69,
2790 0x093334d,0x120c701,0x39206d5,0x021627e },
2791 { 0x183553a,0x03d7319,0x09e5aa7,0x12b8959,0x2087909,0x0011194,
2792 0x1045071,0x0713f32,0x16d0254,0x03aec1a } },
2793 /* 9 */
2794 { { 0x01647c5,0x1b2856b,0x1799461,0x11f133d,0x0b8127d,0x1937eeb,
2795 0x266aa37,0x1f68f71,0x0cbd1b2,0x03aca08 },
2796 { 0x287e008,0x1be361a,0x38f3940,0x276488d,0x2d87dfa,0x0333b2c,
2797 0x2d2e428,0x368755b,0x09b55a7,0x007ca0a } },
2798 /* 10 */
2799 { { 0x389da99,0x2a8300e,0x0022abb,0x27ae0a1,0x0a6f2d7,0x207017a,
2800 0x047862b,0x1358c9e,0x35905e5,0x00cde92 },
2801 { 0x1f7794a,0x1d40348,0x3f613c6,0x2ddf5b5,0x0207005,0x133f5ba,
2802 0x1a37810,0x3ef5829,0x0d5f4c2,0x0035978 } },
2803 /* 11 */
2804 { { 0x1275d38,0x026efad,0x2358d9d,0x1142f82,0x14268a7,0x1cfac99,
2805 0x362ff49,0x288cbc1,0x24252f4,0x0308f68 },
2806 { 0x394520c,0x06e13c2,0x178e5da,0x18ec16f,0x1096667,0x134a7a8,
2807 0x0dcb869,0x33fc4e9,0x38cc790,0x006778e } },
2808 /* 12 */
2809 { { 0x2c5fe04,0x29c5b09,0x1bdb183,0x02ceee8,0x03b28de,0x132dc4b,
2810 0x32c586a,0x32ff5d0,0x3d491fc,0x038d372 },
2811 { 0x2a58403,0x2351aea,0x3a53b40,0x21a0ba5,0x39a6974,0x1aaaa2b,
2812 0x3901273,0x03dfe78,0x3447b4e,0x039d907 } },
2813 /* 13 */
2814 { { 0x364ba59,0x14e5077,0x02fc7d7,0x3b02c09,0x1d33f10,0x0560616,
2815 0x06dfc6a,0x15efd3c,0x357052a,0x01284b7 },
2816 { 0x039dbd0,0x18ce3e5,0x3e1fbfa,0x352f794,0x0d3c24b,0x07c6cc5,
2817 0x1e4ffa2,0x3a91bf5,0x293bb5b,0x01abd6a } },
2818 /* 14 */
2819 { { 0x0c91999,0x02da644,0x0491da1,0x100a960,0x00a24b4,0x2330824,
2820 0x0094b4b,0x1004cf8,0x35a66a4,0x017f8d1 },
2821 { 0x13e7b4b,0x232af7e,0x391ab0f,0x069f08f,0x3292b50,0x3479898,
2822 0x2889aec,0x2a4590b,0x308ecfe,0x02d5138 } },
2823 /* 15 */
2824 { { 0x2ddfdce,0x231ba45,0x39e6647,0x19be245,0x12c3291,0x35399f8,
2825 0x0d6e764,0x3082d3a,0x2bda6b0,0x0382dac },
2826 { 0x37efb57,0x04b7cae,0x00070d3,0x379e431,0x01aac0d,0x1e6f251,
2827 0x0336ad6,0x0ddd3e4,0x3de25a6,0x01c7008 } },
2828 /* 16 */
2829 { { 0x3e20925,0x230912f,0x286762a,0x30e3f73,0x391c19a,0x34e1c18,
2830 0x16a5d5d,0x093d96a,0x3d421d3,0x0187561 },
2831 { 0x37173ea,0x19ce8a8,0x0b65e87,0x0214dde,0x2238480,0x16ead0f,
2832 0x38441e0,0x3bef843,0x2124621,0x03e847f } },
2833 /* 17 */
2834 { { 0x0b19ffd,0x247cacb,0x3c231c8,0x16ec648,0x201ba8d,0x2b172a3,
2835 0x103d678,0x2fb72db,0x04c1f13,0x0161bac },
2836 { 0x3e8ed09,0x171b949,0x2de20c3,0x0f06067,0x21e81a3,0x1b194be,
2837 0x0fd6c05,0x13c449e,0x0087086,0x006756b } },
2838 /* 18 */
2839 { { 0x09a4e1f,0x27d604c,0x00741e9,0x06fa49c,0x0ab7de7,0x3f4a348,
2840 0x25ef0be,0x158fc9a,0x33f7f9c,0x039f001 },
2841 { 0x2f59f76,0x3598e83,0x30501f6,0x15083f2,0x0669b3b,0x29980b5,
2842 0x0c1f7a7,0x0f02b02,0x0fec65b,0x0382141 } },
2843 /* 19 */
2844 { { 0x031b3ca,0x23da368,0x2d66f09,0x27b9b69,0x06d1cab,0x13c91ba,
2845 0x3d81fa9,0x25ad16f,0x0825b09,0x01e3c06 },
2846 { 0x225787f,0x3bf790e,0x2c9bb7e,0x0347732,0x28016f8,0x0d6ff0d,
2847 0x2a4877b,0x1d1e833,0x3b87e94,0x010e9dc } },
2848 /* 20 */
2849 { { 0x2b533d5,0x1ddcd34,0x1dc0625,0x3da86f7,0x3673b8a,0x1e7b0a4,
2850 0x3e7c9aa,0x19ac55d,0x251c3b2,0x02edb79 },
2851 { 0x25259b3,0x24c0ead,0x3480e7e,0x34f40e9,0x3d6a0af,0x2cf3f09,
2852 0x2c83d19,0x2e66f16,0x19a5d18,0x0182d18 } },
2853 /* 21 */
2854 { { 0x2e5aa1c,0x28e3846,0x3658bd6,0x0ad279c,0x1b8b765,0x397e1fb,
2855 0x130014e,0x3ff342c,0x3b2aeeb,0x02743c9 },
2856 { 0x2730a55,0x0918c5e,0x083aca9,0x0bf76ef,0x19c955b,0x300669c,
2857 0x01dfe0a,0x312341f,0x26d356e,0x0091295 } },
2858 /* 22 */
2859 { { 0x2cf1f96,0x00e52ba,0x271c6db,0x2a40930,0x19f2122,0x0b2f4ee,
2860 0x26ac1b8,0x3bda498,0x0873581,0x0117963 },
2861 { 0x38f9dbc,0x3d1e768,0x2040d3f,0x11ba222,0x3a8aaf1,0x1b82fb5,
2862 0x1adfb24,0x2de9251,0x21cc1e4,0x0301038 } },
2863 /* 23 */
2864 { { 0x38117b6,0x2bc001b,0x1433847,0x3fdce8d,0x3651969,0x3651d7a,
2865 0x2b35761,0x1bb1d20,0x097682c,0x00737d7 },
2866 { 0x1f04839,0x1dd6d04,0x16987db,0x3d12378,0x17dbeac,0x1c2cc86,
2867 0x121dd1b,0x3fcf6ca,0x1f8a92d,0x00119d5 } },
2868 /* 24 */
2869 { { 0x0e8ffcd,0x2b174af,0x1a82cc8,0x22cbf98,0x30d53c4,0x080b5b1,
2870 0x3161727,0x297cfdb,0x2113b83,0x0011b97 },
2871 { 0x0007f01,0x23fd936,0x3183e7b,0x0496bd0,0x07fb1ef,0x178680f,
2872 0x1c5ea63,0x0016c11,0x2c3303d,0x01b8041 } },
2873 /* 25 */
2874 { { 0x0dd73b1,0x1cd6122,0x10d948c,0x23e657b,0x3767070,0x15a8aad,
2875 0x385ea8c,0x33c7ce0,0x0ede901,0x0110965 },
2876 { 0x2d4b65b,0x2a8b244,0x0c37f8f,0x0ee5b24,0x394c234,0x3a5e347,
2877 0x26e4a15,0x39a3b4c,0x2514c2e,0x029e5be } },
2878 /* 26 */
2879 { { 0x23addd7,0x3ed8120,0x13b3359,0x20f959a,0x09e2a61,0x32fcf20,
2880 0x05b78e3,0x19ba7e2,0x1a9c697,0x0392b4b },
2881 { 0x2048a61,0x3dfd0a3,0x19a0357,0x233024b,0x3082d19,0x00fb63b,
2882 0x3a1af4c,0x1450ff0,0x046c37b,0x0317a50 } },
2883 /* 27 */
2884 { { 0x3e75f9e,0x294e30a,0x3a78476,0x3a32c48,0x36fd1a9,0x0427012,
2885 0x1e4df0b,0x11d1f61,0x1afdb46,0x018ca0f },
2886 { 0x2f2df15,0x0a33dee,0x27f4ce7,0x1542b66,0x3e592c4,0x20d2f30,
2887 0x3226ade,0x2a4e3ea,0x1ab1981,0x01a2f46 } },
2888 /* 28 */
2889 { { 0x087d659,0x3ab5446,0x305ac08,0x3d2cd64,0x33374d5,0x3f9d3f8,
2890 0x186981c,0x37f5a5a,0x2f53c6f,0x01254a4 },
2891 { 0x2cec896,0x1e32786,0x04844a8,0x043b16d,0x3d964b2,0x1935829,
2892 0x16f7e26,0x1a0dd9a,0x30d2603,0x003b1d4 } },
2893 /* 29 */
2894 { { 0x12687bb,0x04e816b,0x21fa2da,0x1abccb8,0x3a1f83b,0x375181e,
2895 0x0f5ef51,0x0fc2ce4,0x3a66486,0x003d881 },
2896 { 0x3138233,0x1f8eec3,0x2718bd6,0x1b09caa,0x2dd66b9,0x1bb222b,
2897 0x1004072,0x1b73e3b,0x07208ed,0x03fc36c } },
2898 /* 30 */
2899 { { 0x095d553,0x3e84053,0x0a8a749,0x3f575a0,0x3a44052,0x3ced59b,
2900 0x3b4317f,0x03a8c60,0x13c8874,0x00c4ed4 },
2901 { 0x0d11549,0x0b8ab02,0x221cb40,0x02ed37b,0x2071ee1,0x1fc8c83,
2902 0x3987dd4,0x27e049a,0x0f986f1,0x00b4eaf } },
2903 /* 31 */
2904 { { 0x15581a2,0x2214060,0x11af4c2,0x1598c88,0x19a0a6d,0x32acba6,
2905 0x3a7a0f0,0x2337c66,0x210ded9,0x0300dbe },
2906 { 0x1fbd009,0x3822eb0,0x181629a,0x2401b45,0x30b68b1,0x2e78363,
2907 0x2b32779,0x006530b,0x2c4b6d4,0x029aca8 } },
2908 /* 32 */
2909 { { 0x13549cf,0x0f943db,0x265ed43,0x1bfeb35,0x06f3369,0x3847f2d,
2910 0x1bfdacc,0x26181a5,0x252af7c,0x02043b8 },
2911 { 0x159bb2c,0x143f85c,0x357b654,0x2f9d62c,0x2f7dfbe,0x1a7fa9c,
2912 0x057e74d,0x05d14ac,0x17a9273,0x035215c } },
2913 /* 33 */
2914 { { 0x0cb5a98,0x106a2bc,0x10bf117,0x24c7cc4,0x3d3da8f,0x2ce0ab7,
2915 0x14e2cba,0x1813866,0x1a72f9a,0x01a9811 },
2916 { 0x2b2411d,0x3034fe8,0x16e0170,0x0f9443a,0x0be0eb8,0x2196cf3,
2917 0x0c9f738,0x15e40ef,0x0faf9e1,0x034f917 } },
2918 /* 34 */
2919 { { 0x03f7669,0x3da6efa,0x3d6bce1,0x209ca1d,0x109f8ae,0x09109e3,
2920 0x08ae543,0x3067255,0x1dee3c2,0x0081dd5 },
2921 { 0x3ef1945,0x358765b,0x28c387b,0x3bec4b4,0x218813c,0x0b7d92a,
2922 0x3cd1d67,0x2c0367e,0x2e57154,0x0123717 } },
2923 /* 35 */
2924 { { 0x3e5a199,0x1e42ffd,0x0bb7123,0x33e6273,0x1e0efb8,0x294671e,
2925 0x3a2bfe0,0x3d11709,0x2eddff6,0x03cbec2 },
2926 { 0x0b5025f,0x0255d7c,0x1f2241c,0x35d03ea,0x0550543,0x202fef4,
2927 0x23c8ad3,0x354963e,0x015db28,0x0284fa4 } },
2928 /* 36 */
2929 { { 0x2b65cbc,0x1e8d428,0x0226f9f,0x1c8a919,0x10b04b9,0x08fc1e8,
2930 0x1ce241e,0x149bc99,0x2b01497,0x00afc35 },
2931 { 0x3216fb7,0x1374fd2,0x226ad3d,0x19fef76,0x0f7d7b8,0x1c21417,
2932 0x37b83f6,0x3a27eba,0x25a162f,0x010aa52 } },
2933 /* 37 */
2934 { { 0x2adf191,0x1ab42fa,0x28d7584,0x2409689,0x20f8a48,0x253707d,
2935 0x2030504,0x378f7a1,0x169c65e,0x00b0b76 },
2936 { 0x3849c17,0x085c764,0x10dd6d0,0x2e87689,0x1460488,0x30e9521,
2937 0x10c7063,0x1b6f120,0x21f42c5,0x03d0dfe } },
2938 /* 38 */
2939 { { 0x20f7dab,0x035c512,0x29ac6aa,0x24c5ddb,0x20f0497,0x17ce5e1,
2940 0x00a050f,0x1eaa14b,0x3335470,0x02abd16 },
2941 { 0x18d364a,0x0df0cf0,0x316585e,0x018f925,0x0d40b9b,0x17b1511,
2942 0x1716811,0x1caf3d0,0x10df4f2,0x0337d8c } },
2943 /* 39 */
2944 { { 0x2a8b7ef,0x0f188e3,0x2287747,0x06216f0,0x008e935,0x2f6a38d,
2945 0x1567722,0x0bfc906,0x0bada9e,0x03c3402 },
2946 { 0x014d3b1,0x099c749,0x2a76291,0x216c067,0x3b37549,0x14ef2f6,
2947 0x21b96d4,0x1ee2d71,0x2f5ca88,0x016f570 } },
2948 /* 40 */
2949 { { 0x09a3154,0x3d1a7bd,0x2e9aef0,0x255b8ac,0x03e85a5,0x2a492a7,
2950 0x2aec1ea,0x11c6516,0x3c8a09e,0x02a84b7 },
2951 { 0x1f69f1d,0x09c89d3,0x1e7326f,0x0b28bfd,0x0e0e4c8,0x1ea7751,
2952 0x18ce73b,0x2a406e7,0x273e48c,0x01b00db } },
2953 /* 41 */
2954 { { 0x36e3138,0x2b84a83,0x345a5cf,0x00096b4,0x16966ef,0x159caf1,
2955 0x13c64b4,0x2f89226,0x25896af,0x00a4bfd },
2956 { 0x2213402,0x1435117,0x09fed52,0x09d0e4b,0x0f6580e,0x2871cba,
2957 0x3b397fd,0x1c9d825,0x090311b,0x0191383 } },
2958 /* 42 */
2959 { { 0x07153f0,0x1087869,0x18c9e1e,0x1e64810,0x2b86c3b,0x0175d9c,
2960 0x3dce877,0x269de4e,0x393cab7,0x03c96b9 },
2961 { 0x1869d0c,0x06528db,0x02641f3,0x209261b,0x29d55c8,0x25ba517,
2962 0x3b5ea30,0x028f927,0x25313db,0x00e6e39 } },
2963 /* 43 */
2964 { { 0x2fd2e59,0x150802d,0x098f377,0x19a4957,0x135e2c0,0x38a95ce,
2965 0x1ab21a0,0x36c1b67,0x32f0f19,0x00e448b },
2966 { 0x3cad53c,0x3387800,0x17e3cfb,0x03f9970,0x3225b2c,0x2a84e1d,
2967 0x3af1d29,0x3fe35ca,0x2f8ce80,0x0237a02 } },
2968 /* 44 */
2969 { { 0x07bbb76,0x3aa3648,0x2758afb,0x1f085e0,0x1921c7e,0x3010dac,
2970 0x22b74b1,0x230137e,0x1062e36,0x021c652 },
2971 { 0x3993df5,0x24a2ee8,0x126ab5f,0x2d7cecf,0x0639d75,0x16d5414,
2972 0x1aa78a8,0x3f78404,0x26a5b74,0x03f0c57 } },
2973 /* 45 */
2974 { { 0x0d6ecfa,0x3f506ba,0x3f86561,0x3d86bb1,0x15f8c44,0x2491d07,
2975 0x052a7b4,0x2422261,0x3adee38,0x039b529 },
2976 { 0x193c75d,0x14bb451,0x1162605,0x293749c,0x370a70d,0x2e8b1f6,
2977 0x2ede937,0x2b95f4a,0x39a9be2,0x00d77eb } },
2978 /* 46 */
2979 { { 0x2736636,0x15bf36a,0x2b7e6b9,0x25eb8b2,0x209f51d,0x3cd2659,
2980 0x10bf410,0x034afec,0x3d71c83,0x0076971 },
2981 { 0x0ce6825,0x07920cf,0x3c3b5c4,0x23fe55c,0x015ad11,0x08c0dae,
2982 0x0552c7f,0x2e75a8a,0x0fddbf4,0x01c1df0 } },
2983 /* 47 */
2984 { { 0x2b9661c,0x0ffe351,0x3d71bf6,0x1ac34b3,0x3a1dfd3,0x211fe3d,
2985 0x33e140a,0x3f9100d,0x32ee50e,0x014ea18 },
2986 { 0x16d8051,0x1bfda1a,0x068a097,0x2571d3d,0x1daec0c,0x39389af,
2987 0x194dc35,0x3f3058a,0x36d34e1,0x000a329 } },
2988 /* 48 */
2989 { { 0x09877ee,0x351f73f,0x0002d11,0x0420074,0x2c8b362,0x130982d,
2990 0x02c1175,0x3c11b40,0x0d86962,0x001305f },
2991 { 0x0daddf5,0x2f4252c,0x15c06d9,0x1d49339,0x1bea235,0x0b680ed,
2992 0x3356e67,0x1d1d198,0x1e9fed9,0x03dee93 } },
2993 /* 49 */
2994 { { 0x3e1263f,0x2fe8d3a,0x3ce6d0d,0x0d5c6b9,0x3557637,0x0a9bd48,
2995 0x0405538,0x0710749,0x2005213,0x038c7e5 },
2996 { 0x26b6ec6,0x2e485ba,0x3c44d1b,0x0b9cf0b,0x037a1d1,0x27428a5,
2997 0x0e7eac8,0x351ef04,0x259ce34,0x02a8e98 } },
2998 /* 50 */
2999 { { 0x2f3dcd3,0x3e77d4d,0x3360fbc,0x1434afd,0x36ceded,0x3d413d6,
3000 0x1710fad,0x36bb924,0x1627e79,0x008e637 },
3001 { 0x109569e,0x1c168db,0x3769cf4,0x2ed4527,0x0ea0619,0x17d80d3,
3002 0x1c03773,0x18843fe,0x1b21c04,0x015c5fd } },
3003 /* 51 */
3004 { { 0x1dd895e,0x08a7248,0x04519fe,0x001030a,0x18e5185,0x358dfb3,
3005 0x13d2391,0x0a37be8,0x0560e3c,0x019828b },
3006 { 0x27fcbd0,0x2a22bb5,0x30969cc,0x1e03aa7,0x1c84724,0x0ba4ad3,
3007 0x32f4817,0x0914cca,0x14c4f52,0x01893b9 } },
3008 /* 52 */
3009 { { 0x097eccc,0x1273936,0x00aa095,0x364fe62,0x04d49d1,0x10e9f08,
3010 0x3c24230,0x3ef01c8,0x2fb92bd,0x013ce4a },
3011 { 0x1e44fd9,0x27e3e9f,0x2156696,0x3915ecc,0x0b66cfb,0x1a3af0f,
3012 0x2fa8033,0x0e6736c,0x177ccdb,0x0228f9e } },
3013 /* 53 */
3014 { { 0x2c4b125,0x06207c1,0x0a8cdde,0x003db8f,0x1ae34e3,0x31e84fa,
3015 0x2999de5,0x11013bd,0x02370c2,0x00e2234 },
3016 { 0x0f91081,0x200d591,0x1504762,0x1857c05,0x23d9fcf,0x0cb34db,
3017 0x27edc86,0x08cd860,0x2471810,0x029798b } },
3018 /* 54 */
3019 { { 0x3acd6c8,0x097b8cb,0x3c661a8,0x15152f2,0x1699c63,0x237e64c,
3020 0x23edf79,0x16b7033,0x0e6466a,0x00b11da },
3021 { 0x0a64bc9,0x1bfe324,0x1f5cb34,0x08391de,0x0630a60,0x3017a21,
3022 0x09d064b,0x14a8365,0x041f9e6,0x01ed799 } },
3023 /* 55 */
3024 { { 0x128444a,0x2508b07,0x2a39216,0x362f84d,0x2e996c5,0x2c31ff3,
3025 0x07afe5f,0x1d1288e,0x3cb0c8d,0x02e2bdc },
3026 { 0x38b86fd,0x3a0ea8c,0x1cff5fd,0x1629629,0x3fee3f1,0x02b250c,
3027 0x2e8f6f2,0x0225727,0x15f7f3f,0x0280d8e } },
3028 /* 56 */
3029 { { 0x10f7770,0x0f1aee8,0x0e248c7,0x20684a8,0x3a6f16d,0x06f0ae7,
3030 0x0df6825,0x2d4cc40,0x301875f,0x012f8da },
3031 { 0x3b56dbb,0x1821ba7,0x24f8922,0x22c1f9e,0x0306fef,0x1b54bc8,
3032 0x2ccc056,0x00303ba,0x2871bdc,0x0232f26 } },
3033 /* 57 */
3034 { { 0x0dac4ab,0x0625730,0x3112e13,0x101c4bf,0x3a874a4,0x2873b95,
3035 0x32ae7c6,0x0d7e18c,0x13e0c08,0x01139d5 },
3036 { 0x334002d,0x00fffdd,0x025c6d5,0x22c2cd1,0x19d35cb,0x3a1ce2d,
3037 0x3702760,0x3f06257,0x03a5eb8,0x011c29a } },
3038 /* 58 */
3039 { { 0x0513482,0x1d87724,0x276a81b,0x0a807a4,0x3028720,0x339cc20,
3040 0x2441ee0,0x31bbf36,0x290c63d,0x0059041 },
3041 { 0x106a2ed,0x0d2819b,0x100bf50,0x114626c,0x1dd4d77,0x2e08632,
3042 0x14ae72a,0x2ed3f64,0x1fd7abc,0x035cd1e } },
3043 /* 59 */
3044 { { 0x2d4c6e5,0x3bec596,0x104d7ed,0x23d6c1b,0x0262cf0,0x15d72c5,
3045 0x2d5bb18,0x199ac4b,0x1e30771,0x020591a },
3046 { 0x21e291e,0x2e75e55,0x1661d7a,0x08b0778,0x3eb9daf,0x0d78144,
3047 0x1827eb1,0x0fe73d2,0x123f0dd,0x0028db7 } },
3048 /* 60 */
3049 { { 0x1d5533c,0x34cb1d0,0x228f098,0x27a1a11,0x17c5f5a,0x0d26f44,
3050 0x2228ade,0x2c460e6,0x3d6fdba,0x038cc77 },
3051 { 0x3cc6ed8,0x02ada1a,0x260e510,0x2f7bde8,0x37160c3,0x33a1435,
3052 0x23d9a7b,0x0ce2641,0x02a492e,0x034ed1e } },
3053 /* 61 */
3054 { { 0x3821f90,0x26dba3c,0x3aada14,0x3b59bad,0x292edd9,0x2804c45,
3055 0x3669531,0x296f42e,0x35a4c86,0x01ca049 },
3056 { 0x3ff47e5,0x2163df4,0x2441503,0x2f18405,0x15e1616,0x37f66ec,
3057 0x30f11a7,0x141658a,0x27ece14,0x00b018b } },
3058 /* 62 */
3059 { { 0x159ac2e,0x3e65bc0,0x2713a76,0x0db2f6c,0x3281e77,0x2391811,
3060 0x16d2880,0x1fbc4ab,0x1f92c4e,0x00a0a8d },
3061 { 0x0ce5cd2,0x152c7b0,0x02299c3,0x3244de7,0x2cf99ef,0x3a0b047,
3062 0x2caf383,0x0aaf664,0x113554d,0x031c735 } },
3063 /* 63 */
3064 { { 0x1b578f4,0x177a702,0x3a7a488,0x1638ebf,0x31884e2,0x2460bc7,
3065 0x36b1b75,0x3ce8e3d,0x340cf47,0x03143d9 },
3066 { 0x34b68ea,0x12b7ccd,0x1fe2a9c,0x08da659,0x0a406f3,0x1694c14,
3067 0x06a2228,0x16370be,0x3a72129,0x02e7b2c } },
3068 /* 64 */
3069 { { 0x0f8b16a,0x21043bd,0x266a56f,0x3fb11ec,0x197241a,0x36721f0,
3070 0x006b8e6,0x2ac6c29,0x202cd42,0x0200fcf },
3071 { 0x0dbec69,0x0c26a01,0x105f7f0,0x3dceeeb,0x3a83b85,0x363865f,
3072 0x097273a,0x2b70718,0x00e5067,0x03025d1 } },
3073 /* 65 */
3074 { { 0x379ab34,0x295bcb0,0x38d1846,0x22e1077,0x3a8ee06,0x1db1a3b,
3075 0x3144591,0x07cc080,0x2d5915f,0x03c6bcc },
3076 { 0x175bd50,0x0dd4c57,0x27bc99c,0x2ebdcbd,0x3837cff,0x235dc8f,
3077 0x13a4184,0x0722c18,0x130e2d4,0x008f43c } },
3078 /* 66 */
3079 { { 0x01500d9,0x2adbb7d,0x2da8857,0x397f2fa,0x10d890a,0x25c9654,
3080 0x3e86488,0x3eb754b,0x1d6c0a3,0x02c0a23 },
3081 { 0x10bcb08,0x083cc19,0x2e16853,0x04da575,0x271af63,0x2626a9d,
3082 0x3520a7b,0x32348c7,0x24ff408,0x03ff4dc } },
3083 /* 67 */
3084 { { 0x058e6cb,0x1a3992d,0x1d28539,0x080c5e9,0x2992dad,0x2a9d7d5,
3085 0x14ae0b7,0x09b7ce0,0x34ad78c,0x03d5643 },
3086 { 0x30ba55a,0x092f4f3,0x0bae0fc,0x12831de,0x20fc472,0x20ed9d2,
3087 0x29864f6,0x1288073,0x254f6f7,0x00635b6 } },
3088 /* 68 */
3089 { { 0x1be5a2b,0x0f88975,0x33c6ed9,0x20d64d3,0x06fe799,0x0989bff,
3090 0x1409262,0x085a90c,0x0d97990,0x0142eed },
3091 { 0x17ec63e,0x06471b9,0x0db2378,0x1006077,0x265422c,0x08db83d,
3092 0x28099b0,0x1270d06,0x11801fe,0x00ac400 } },
3093 /* 69 */
3094 { { 0x3391593,0x22d7166,0x30fcfc6,0x2896609,0x3c385f5,0x066b72e,
3095 0x04f3aad,0x2b831c5,0x19983fb,0x0375562 },
3096 { 0x0b82ff4,0x222e39d,0x34c993b,0x101c79c,0x2d2e03c,0x0f00c8a,
3097 0x3a9eaf4,0x1810669,0x151149d,0x039b931 } },
3098 /* 70 */
3099 { { 0x29af288,0x1956ec7,0x293155f,0x193deb6,0x1647e1a,0x2ca0839,
3100 0x297e4bc,0x15bfd0d,0x1b107ed,0x0147803 },
3101 { 0x31c327e,0x05a6e1d,0x02ad43d,0x02d2a5b,0x129cdb2,0x37ad1de,
3102 0x3d51f53,0x245df01,0x2414982,0x0388bd0 } },
3103 /* 71 */
3104 { { 0x35f1abb,0x17a3d18,0x0874cd4,0x2d5a14e,0x17edc0c,0x16a00d3,
3105 0x072c1fb,0x1232725,0x33d52dc,0x03dc24d },
3106 { 0x0af30d6,0x259aeea,0x369c401,0x12bc4de,0x295bf5f,0x0d8711f,
3107 0x26162a9,0x16c44e5,0x288e727,0x02f54b4 } },
3108 /* 72 */
3109 { { 0x05fa877,0x1571ea7,0x3d48ab1,0x1c9f4e8,0x017dad6,0x0f46276,
3110 0x343f9e7,0x1de990f,0x0e4c8aa,0x028343e },
3111 { 0x094f92d,0x3abf633,0x1b3a0bb,0x2f83137,0x0d818c8,0x20bae85,
3112 0x0c65f8b,0x1a8008b,0x0c7946d,0x0295b1e } },
3113 /* 73 */
3114 { { 0x1d09529,0x08e46c3,0x1fcf296,0x298f6b7,0x1803e0e,0x2d6fd20,
3115 0x37351f5,0x0d9e8b1,0x1f8731a,0x0362fbf },
3116 { 0x00157f4,0x06750bf,0x2650ab9,0x35ffb23,0x2f51cae,0x0b522c2,
3117 0x39cb400,0x191e337,0x0a5ce9f,0x021529a } },
3118 /* 74 */
3119 { { 0x3506ea5,0x17d9ed8,0x0d66dc3,0x22693f8,0x19286c4,0x3a57353,
3120 0x101d3bf,0x1aa54fc,0x20b9884,0x0172b3a },
3121 { 0x0eac44d,0x37d8327,0x1c3aa90,0x3d0d534,0x23db29a,0x3576eaf,
3122 0x1d3de8a,0x3bea423,0x11235e4,0x039260b } },
3123 /* 75 */
3124 { { 0x34cd55e,0x01288b0,0x1132231,0x2cc9a03,0x358695b,0x3e87650,
3125 0x345afa1,0x01267ec,0x3f616b2,0x02011ad },
3126 { 0x0e7d098,0x0d6078e,0x0b70b53,0x237d1bc,0x0d7f61e,0x132de31,
3127 0x1ea9ea4,0x2bd54c3,0x27b9082,0x03ac5f2 } },
3128 /* 76 */
3129 { { 0x2a145b9,0x06d661d,0x31ec175,0x03f06f1,0x3a5cf6b,0x249c56e,
3130 0x2035653,0x384c74f,0x0bafab5,0x0025ec0 },
3131 { 0x25f69e1,0x1b23a55,0x1199aa6,0x16ad6f9,0x077e8f7,0x293f661,
3132 0x33ba11d,0x3327980,0x07bafdb,0x03e571d } },
3133 /* 77 */
3134 { { 0x2bae45e,0x3c074ef,0x2955558,0x3c312f1,0x2a8ebe9,0x2f193f1,
3135 0x3705b1d,0x360deba,0x01e566e,0x00d4498 },
3136 { 0x21161cd,0x1bc787e,0x2f87933,0x3553197,0x1328ab8,0x093c879,
3137 0x17eee27,0x2adad1d,0x1236068,0x003be5c } },
3138 /* 78 */
3139 { { 0x0ca4226,0x2633dd5,0x2c8e025,0x0e3e190,0x05eede1,0x1a385e4,
3140 0x163f744,0x2f25522,0x1333b4f,0x03f05b6 },
3141 { 0x3c800ca,0x1becc79,0x2daabe9,0x0c499e2,0x1138063,0x3fcfa2d,
3142 0x2244976,0x1e85cf5,0x2f1b95d,0x0053292 } },
3143 /* 79 */
3144 { { 0x12f81d5,0x1dc6eaf,0x11967a4,0x1a407df,0x31a5f9d,0x2b67241,
3145 0x18bef7c,0x08c7762,0x063f59c,0x01015ec },
3146 { 0x1c05c0a,0x360bfa2,0x1f85bff,0x1bc7703,0x3e4911c,0x0d685b6,
3147 0x2fccaea,0x02c4cef,0x164f133,0x0070ed7 } },
3148 /* 80 */
3149 { { 0x0ec21fe,0x052ffa0,0x3e825fe,0x1ab0956,0x3f6ce11,0x3d29759,
3150 0x3c5a072,0x18ebe62,0x148db7e,0x03eb49c },
3151 { 0x1ab05b3,0x02dab0a,0x1ae690c,0x0f13894,0x137a9a8,0x0aab79f,
3152 0x3dc875c,0x06a1029,0x1e39f0e,0x01dce1f } },
3153 /* 81 */
3154 { { 0x16c0dd7,0x3b31269,0x2c741e9,0x3611821,0x2a5cffc,0x1416bb3,
3155 0x3a1408f,0x311fa3d,0x1c0bef0,0x02cdee1 },
3156 { 0x00e6a8f,0x1adb933,0x0f23359,0x2fdace2,0x2fd6d4b,0x0e73bd3,
3157 0x2453fac,0x0a356ae,0x2c8f9f6,0x02704d6 } },
3158 /* 82 */
3159 { { 0x0e35743,0x28c80a1,0x0def32a,0x2c6168f,0x1320d6a,0x37c6606,
3160 0x21b1761,0x2147ee0,0x21fc433,0x015c84d },
3161 { 0x1fc9168,0x36cda9c,0x003c1f0,0x1cd7971,0x15f98ba,0x1ef363d,
3162 0x0ca87e3,0x046f7d9,0x3c9e6bb,0x0372eb0 } },
3163 /* 83 */
3164 { { 0x118cbe2,0x3665a11,0x304ef01,0x062727a,0x3d242fc,0x11ffbaf,
3165 0x3663c7e,0x1a189c9,0x09e2d62,0x02e3072 },
3166 { 0x0e1d569,0x162f772,0x0cd051a,0x322df62,0x3563809,0x047cc7a,
3167 0x027fd9f,0x08b509b,0x3da2f94,0x01748ee } },
3168 /* 84 */
3169 { { 0x1c8f8be,0x31ca525,0x22bf0a1,0x200efcd,0x02961c4,0x3d8f52b,
3170 0x018403d,0x3a40279,0x1cb91ec,0x030427e },
3171 { 0x0945705,0x0257416,0x05c0c2d,0x25b77ae,0x3b9083d,0x2901126,
3172 0x292b8d7,0x07b8611,0x04f2eee,0x026f0cd } },
3173 /* 85 */
3174 { { 0x2913074,0x2b8d590,0x02b10d5,0x09d2295,0x255491b,0x0c41cca,
3175 0x1ca665b,0x133051a,0x1525f1a,0x00a5647 },
3176 { 0x04f983f,0x3d6daee,0x04e1e76,0x1067d7e,0x1be7eef,0x02ea862,
3177 0x00d4968,0x0ccb048,0x11f18ef,0x018dd95 } },
3178 /* 86 */
3179 { { 0x22976cc,0x17c5395,0x2c38bda,0x3983bc4,0x222bca3,0x332a614,
3180 0x3a30646,0x261eaef,0x1c808e2,0x02f6de7 },
3181 { 0x306a772,0x32d7272,0x2dcefd2,0x2abf94d,0x038f475,0x30ad76e,
3182 0x23e0227,0x3052b0a,0x001add3,0x023ba18 } },
3183 /* 87 */
3184 { { 0x0ade873,0x25a6069,0x248ccbe,0x13713ee,0x17ee9aa,0x28152e9,
3185 0x2e28995,0x2a92cb3,0x17a6f77,0x024b947 },
3186 { 0x190a34d,0x2ebea1c,0x1ed1948,0x16fdaf4,0x0d698f7,0x32bc451,
3187 0x0ee6e30,0x2aaab40,0x06f0a56,0x01460be } },
3188 /* 88 */
3189 { { 0x24cc99c,0x1884b1e,0x1ca1fba,0x1a0f9b6,0x2ff609b,0x2b26316,
3190 0x3b27cb5,0x29bc976,0x35d4073,0x024772a },
3191 { 0x3575a70,0x1b30f57,0x07fa01b,0x0e5be36,0x20cb361,0x26605cd,
3192 0x1d4e8c8,0x13cac59,0x2db9797,0x005e833 } },
3193 /* 89 */
3194 { { 0x36c8d3a,0x1878a81,0x124b388,0x0e4843e,0x1701aad,0x0ea0d76,
3195 0x10eae41,0x37d0653,0x36c7f4c,0x00ba338 },
3196 { 0x37a862b,0x1cf6ac0,0x08fa912,0x2dd8393,0x101ba9b,0x0eebcb7,
3197 0x2453883,0x1a3cfe5,0x2cb34f6,0x03d3331 } },
3198 /* 90 */
3199 { { 0x1f79687,0x3d4973c,0x281544e,0x2564bbe,0x17c5954,0x171e34a,
3200 0x231741a,0x3cf2784,0x0889a0d,0x02b036d },
3201 { 0x301747f,0x3f1c477,0x1f1386b,0x163bc5f,0x1592b93,0x332daed,
3202 0x080e4f5,0x1d28b96,0x26194c9,0x0256992 } },
3203 /* 91 */
3204 { { 0x15a4c93,0x07bf6b0,0x114172c,0x1ce0961,0x140269b,0x1b2c2eb,
3205 0x0dfb1c1,0x019ddaa,0x0ba2921,0x008c795 },
3206 { 0x2e6d2dc,0x37e45e2,0x2918a70,0x0fce444,0x34d6aa6,0x396dc88,
3207 0x27726b5,0x0c787d8,0x032d8a7,0x02ac2f8 } },
3208 /* 92 */
3209 { { 0x1131f2d,0x2b43a63,0x3101097,0x38cec13,0x0637f09,0x17a69d2,
3210 0x086196d,0x299e46b,0x0802cf6,0x03c6f32 },
3211 { 0x0daacb4,0x1a4503a,0x100925c,0x15583d9,0x23c4e40,0x1de4de9,
3212 0x1cc8fc4,0x2c9c564,0x0695aeb,0x02145a5 } },
3213 /* 93 */
3214 { { 0x1dcf593,0x17050fc,0x3e3bde3,0x0a6c062,0x178202b,0x2f7674f,
3215 0x0dadc29,0x15763a7,0x1d2daad,0x023d9f6 },
3216 { 0x081ea5f,0x045959d,0x190c841,0x3a78d31,0x0e7d2dd,0x1414fea,
3217 0x1d43f40,0x22d77ff,0x2b9c072,0x03e115c } },
3218 /* 94 */
3219 { { 0x3af71c9,0x29e9c65,0x25655e1,0x111e9cd,0x3a14494,0x3875418,
3220 0x34ae070,0x0b06686,0x310616b,0x03b7b89 },
3221 { 0x1734121,0x00d3d44,0x29f0b2f,0x1552897,0x31cac6e,0x1030bb3,
3222 0x0148f3a,0x35fd237,0x29b44eb,0x027f49f } },
3223 /* 95 */
3224 { { 0x2e2cb16,0x1d962bd,0x19b63cc,0x0b3f964,0x3e3eb7d,0x1a35560,
3225 0x0c58161,0x3ce1d6a,0x3b6958f,0x029030b },
3226 { 0x2dcc158,0x3b1583f,0x30568c9,0x31957c8,0x27ad804,0x28c1f84,
3227 0x3967049,0x37b3f64,0x3b87dc6,0x0266f26 } },
3228 /* 96 */
3229 { { 0x27dafc6,0x2548764,0x0d1984a,0x1a57027,0x252c1fb,0x24d9b77,
3230 0x1581a0f,0x1f99276,0x10ba16d,0x026af88 },
3231 { 0x0915220,0x2be1292,0x16c6480,0x1a93760,0x2fa7317,0x1a07296,
3232 0x1539871,0x112c31f,0x25787f3,0x01e2070 } },
3233 /* 97 */
3234 { { 0x0bcf3ff,0x266d478,0x34f6933,0x31449fd,0x00d02cb,0x340765a,
3235 0x3465a2d,0x225023e,0x319a30e,0x00579b8 },
3236 { 0x20e05f4,0x35b834f,0x0404646,0x3710d62,0x3fad7bd,0x13e1434,
3237 0x21c7d1c,0x1cb3af9,0x2cf1911,0x003957e } },
3238 /* 98 */
3239 { { 0x0787564,0x36601be,0x1ce67e9,0x084c7a1,0x21a3317,0x2067a35,
3240 0x0158cab,0x195ddac,0x1766fe9,0x035cf42 },
3241 { 0x2b7206e,0x20d0947,0x3b42424,0x03f1862,0x0a51929,0x38c2948,
3242 0x0bb8595,0x2942d77,0x3748f15,0x0249428 } },
3243 /* 99 */
3244 { { 0x2577410,0x3c23e2f,0x28c6caf,0x00d41de,0x0fd408a,0x30298e9,
3245 0x363289e,0x2302fc7,0x082c1cc,0x01dd050 },
3246 { 0x30991cd,0x103e9ba,0x029605a,0x19927f7,0x0c1ca08,0x0c93f50,
3247 0x28a3c7b,0x082e4e9,0x34d12eb,0x0232c13 } },
3248 /* 100 */
3249 { { 0x106171c,0x0b4155a,0x0c3fb1c,0x336c090,0x19073e9,0x2241a10,
3250 0x0e6b4fd,0x0ed476e,0x1ef4712,0x039390a },
3251 { 0x0ec36f4,0x3754f0e,0x2a270b8,0x007fd2d,0x0f9d2dc,0x1e6a692,
3252 0x066e078,0x1954974,0x2ff3c6e,0x00def28 } },
3253 /* 101 */
3254 { { 0x3562470,0x0b8f1f7,0x0ac94cd,0x28b0259,0x244f272,0x031e4ef,
3255 0x2d5df98,0x2c8a9f1,0x2dc3002,0x016644f },
3256 { 0x350592a,0x0e6a0d5,0x1e027a1,0x2039e0f,0x399e01d,0x2817593,
3257 0x0c0375e,0x3889b3e,0x24ab013,0x010de1b } },
3258 /* 102 */
3259 { { 0x256b5a6,0x0ac3b67,0x28f9ff3,0x29b67f1,0x30750d9,0x25e11a9,
3260 0x15e8455,0x279ebb0,0x298b7e7,0x0218e32 },
3261 { 0x2fc24b2,0x2b82582,0x28f22f5,0x2bd36b3,0x305398e,0x3b2e9e3,
3262 0x365dd0a,0x29bc0ed,0x36a7b3a,0x007b374 } },
3263 /* 103 */
3264 { { 0x05ff2f3,0x2b3589b,0x29785d3,0x300a1ce,0x0a2d516,0x0844355,
3265 0x14c9fad,0x3ccb6b6,0x385d459,0x0361743 },
3266 { 0x0b11da3,0x002e344,0x18c49f7,0x0c29e0c,0x1d2c22c,0x08237b3,
3267 0x2988f49,0x0f18955,0x1c3b4ed,0x02813c6 } },
3268 /* 104 */
3269 { { 0x17f93bd,0x249323b,0x11f6087,0x174e4bd,0x3cb64ac,0x086dc6b,
3270 0x2e330a8,0x142c1f2,0x2ea5c09,0x024acbb },
3271 { 0x1b6e235,0x3132521,0x00f085a,0x2a4a4db,0x1ab2ca4,0x0142224,
3272 0x3aa6b3e,0x09db203,0x2215834,0x007b9e0 } },
3273 /* 105 */
3274 { { 0x23e79f7,0x28b8039,0x1906a60,0x2cbce67,0x1f590e7,0x181f027,
3275 0x21054a6,0x3854240,0x2d857a6,0x03cfcb3 },
3276 { 0x10d9b55,0x1443cfc,0x2648200,0x2b36190,0x09d2fcf,0x22f439f,
3277 0x231aa7e,0x3884395,0x0543da3,0x003d5a9 } },
3278 /* 106 */
3279 { { 0x043e0df,0x06ffe84,0x3e6d5b2,0x3327001,0x26c74b6,0x12a145e,
3280 0x256ec0d,0x3898c69,0x3411969,0x02f63c5 },
3281 { 0x2b7494a,0x2eee1af,0x38388a9,0x1bd17ce,0x21567d4,0x13969e6,
3282 0x3a12a7a,0x3e8277d,0x03530cc,0x00b4687 } },
3283 /* 107 */
3284 { { 0x06508da,0x38e04d4,0x15a7192,0x312875e,0x3336180,0x2a6512c,
3285 0x1b59497,0x2e91b37,0x25eb91f,0x02841e9 },
3286 { 0x394d639,0x0747143,0x37d7e6d,0x1d62962,0x08b4af3,0x34df287,
3287 0x3c5584b,0x26bc869,0x20af87a,0x0060f5d } },
3288 /* 108 */
3289 { { 0x1de59a4,0x1a5c443,0x2f8729d,0x01c3a2f,0x0f1ad8d,0x3cbaf9e,
3290 0x1b49634,0x35d508a,0x39dc269,0x0075105 },
3291 { 0x390d30e,0x37033e0,0x110cb32,0x14c37a0,0x20a3b27,0x2f00ce6,
3292 0x2f1dc52,0x34988c6,0x0c29606,0x01dc7e7 } },
3293 /* 109 */
3294 { { 0x1040739,0x24f9de1,0x2939999,0x2e6009a,0x244539d,0x17e3f09,
3295 0x00f6f2f,0x1c63b3d,0x2310362,0x019109e },
3296 { 0x1428aa8,0x3cb61e1,0x09a84f4,0x0ffafed,0x07b7adc,0x08f406b,
3297 0x1b2c6df,0x035b480,0x3496ae9,0x012766d } },
3298 /* 110 */
3299 { { 0x35d1099,0x2362f10,0x1a08cc7,0x13a3a34,0x12adbcd,0x32da290,
3300 0x02e2a02,0x151140b,0x01b3f60,0x0240df6 },
3301 { 0x34c7b61,0x2eb09c1,0x172e7cd,0x2ad5eff,0x2fe2031,0x25b54d4,
3302 0x0cec965,0x18e7187,0x26a7cc0,0x00230f7 } },
3303 /* 111 */
3304 { { 0x2d552ab,0x374083d,0x01f120f,0x2601736,0x156baff,0x04d44a4,
3305 0x3b7c3e9,0x1acbc1b,0x0424579,0x031a425 },
3306 { 0x1231bd1,0x0eba710,0x020517b,0x21d7316,0x21eac6e,0x275a848,
3307 0x0837abf,0x0eb0082,0x302cafe,0x00fe8f6 } },
3308 /* 112 */
3309 { { 0x1058880,0x28f9941,0x03f2d75,0x3bd90e5,0x17da365,0x2ac9249,
3310 0x07861cf,0x023fd05,0x1b0fdb8,0x031712f },
3311 { 0x272b56b,0x04f8d2c,0x043a735,0x25446e4,0x1c8327e,0x221125a,
3312 0x0ce37df,0x2dad7f6,0x39446c2,0x00b55b6 } },
3313 /* 113 */
3314 { { 0x346ac6b,0x05e0bff,0x2425246,0x0981e8b,0x1d19f79,0x2692378,
3315 0x3ea3c40,0x2e90beb,0x19de503,0x003d5af },
3316 { 0x05cda49,0x353b44d,0x299d137,0x3f205bc,0x2821158,0x3ad0d00,
3317 0x06a54aa,0x2d7c79f,0x39d1173,0x01000ee } },
3318 /* 114 */
3319 { { 0x0803387,0x3a06268,0x14043b8,0x3d4e72f,0x1ece115,0x0a1dfc8,
3320 0x17208dd,0x0be790a,0x122a07f,0x014dd95 },
3321 { 0x0a4182d,0x202886a,0x1f79a49,0x1e8c867,0x0a2bbd0,0x28668b5,
3322 0x0d0a2e1,0x115259d,0x3586c5d,0x01e815b } },
3323 /* 115 */
3324 { { 0x18a2a47,0x2c95627,0x2773646,0x1230f7c,0x15b5829,0x2fc354e,
3325 0x2c000ea,0x099d547,0x2f17a1a,0x01df520 },
3326 { 0x3853948,0x06f6561,0x3feeb8a,0x2f5b3ef,0x3a6f817,0x01a0791,
3327 0x2ec0578,0x2c392ad,0x12b2b38,0x0104540 } },
3328 /* 116 */
3329 { { 0x1e28ced,0x0fc3d1b,0x2c473c7,0x1826c4f,0x21d5da7,0x39718e4,
3330 0x38ce9e6,0x0251986,0x172fbea,0x0337c11 },
3331 { 0x053c3b0,0x0f162db,0x043c1cb,0x04111ee,0x297fe3c,0x32e5e03,
3332 0x2b8ae12,0x0c427ec,0x1da9738,0x03b9c0f } },
3333 /* 117 */
3334 { { 0x357e43a,0x054503f,0x11b8345,0x34ec6e0,0x2d44660,0x3d0ae61,
3335 0x3b5dff8,0x33884ac,0x09da162,0x00a82b6 },
3336 { 0x3c277ba,0x129a51a,0x027664e,0x1530507,0x0c788c9,0x2afd89d,
3337 0x1aa64cc,0x1196450,0x367ac2b,0x0358b42 } },
3338 /* 118 */
3339 { { 0x0054ac4,0x1761ecb,0x378839c,0x167c9f7,0x2570058,0x0604a35,
3340 0x37cbf3b,0x0909bb7,0x3f2991c,0x02ce688 },
3341 { 0x0b16ae5,0x212857c,0x351b952,0x2c684db,0x30c6a05,0x09c01e0,
3342 0x23c137f,0x1331475,0x092c067,0x0013b40 } },
3343 /* 119 */
3344 { { 0x2e90393,0x0617466,0x24e61f4,0x0a528f5,0x03047b4,0x2153f05,
3345 0x0001a69,0x30e1eb8,0x3c10177,0x0282a47 },
3346 { 0x22c831e,0x28fc06b,0x3e16ff0,0x208adc9,0x0bb76ae,0x28c1d6d,
3347 0x12c8a15,0x031063c,0x1889ed2,0x002133e } },
3348 /* 120 */
3349 { { 0x0a6becf,0x14277bf,0x3328d98,0x201f7fe,0x12fceae,0x1de3a2e,
3350 0x0a15c44,0x3ddf976,0x1b273ab,0x0355e55 },
3351 { 0x1b5d4f1,0x369e78c,0x3a1c210,0x12cf3e9,0x3aa52f0,0x309f082,
3352 0x112089d,0x107c753,0x24202d1,0x023853a } },
3353 /* 121 */
3354 { { 0x2897042,0x140d17c,0x2c4aeed,0x07d0d00,0x18d0533,0x22f7ec8,
3355 0x19c194c,0x3456323,0x2372aa4,0x0165f86 },
3356 { 0x30bd68c,0x1fb06b3,0x0945032,0x372ac09,0x06d4be0,0x27f8fa1,
3357 0x1c8d7ac,0x137a96e,0x236199b,0x0328fc0 } },
3358 /* 122 */
3359 { { 0x170bd20,0x2842d58,0x1de7592,0x3c5b4fd,0x20ea897,0x12cab78,
3360 0x363ff14,0x01f928c,0x17e309c,0x02f79ff },
3361 { 0x0f5432c,0x2edb4ae,0x044b516,0x32f810d,0x2210dc1,0x23e56d6,
3362 0x301e6ff,0x34660f6,0x10e0a7d,0x02d88eb } },
3363 /* 123 */
3364 { { 0x0c7b65b,0x2f59d58,0x2289a75,0x2408e92,0x1ab8c55,0x1ec99e5,
3365 0x220fd0d,0x04defe0,0x24658ec,0x035aa8b },
3366 { 0x138bb85,0x2f002d4,0x295c10a,0x08760ce,0x28c31d1,0x1c0a8cb,
3367 0x0ff00b1,0x144eac9,0x2e02dcc,0x0044598 } },
3368 /* 124 */
3369 { { 0x3b42b87,0x050057b,0x0dff781,0x1c06db1,0x1bd9f5d,0x1f5f04a,
3370 0x2cccd7a,0x143e19b,0x1cb94b7,0x036cfb8 },
3371 { 0x34837cf,0x3cf6c3c,0x0d4fb26,0x22ee55e,0x1e7eed1,0x315995f,
3372 0x2cdf937,0x1a96574,0x0425220,0x0221a99 } },
3373 /* 125 */
3374 { { 0x1b569ea,0x0d33ed9,0x19c13c2,0x107dc84,0x2200111,0x0569867,
3375 0x2dc85da,0x05ef22e,0x0eb018a,0x029c33d },
3376 { 0x04a6a65,0x3e5eba3,0x378f224,0x09c04d0,0x036e5cf,0x3df8258,
3377 0x3a609e4,0x1eddef8,0x2abd174,0x02a91dc } },
3378 /* 126 */
3379 { { 0x2a60cc0,0x1d84c5e,0x115f676,0x1840da0,0x2c79163,0x2f06ed6,
3380 0x198bb4b,0x3e5d37b,0x1dc30fa,0x018469b },
3381 { 0x15ee47a,0x1e32f30,0x16a530e,0x2093836,0x02e8962,0x3767b62,
3382 0x335adf3,0x27220db,0x2f81642,0x0173ffe } },
3383 /* 127 */
3384 { { 0x37a99cd,0x1533fe6,0x05a1c0d,0x27610f1,0x17bf3b9,0x0b1ce78,
3385 0x0a908f6,0x265300e,0x3237dc1,0x01b969a },
3386 { 0x3a5db77,0x2d15382,0x0d63ef8,0x1feb3d8,0x0b7b880,0x19820de,
3387 0x11c0c67,0x2af3396,0x38d242d,0x0120688 } },
3388 /* 128 */
3389 { { 0x1d0b34a,0x05ef00d,0x00a7e34,0x1ae0c9f,0x1440b38,0x300d8b4,
3390 0x37262da,0x3e50e3e,0x14ce0cd,0x00b1044 },
3391 { 0x195a0b1,0x173bc6b,0x03622ba,0x2a19f55,0x1c09b37,0x07921b2,
3392 0x16cdd20,0x24a5c9b,0x2bf42ff,0x00811de } },
3393 /* 129 */
3394 { { 0x0d65dbf,0x145cf06,0x1ad82f7,0x038ce7b,0x077bf94,0x33c4007,
3395 0x22d26bd,0x25ad9c0,0x09ac773,0x02b1990 },
3396 { 0x2261cc3,0x2ecdbf1,0x3e908b0,0x3246439,0x0213f7b,0x1179b04,
3397 0x01cebaa,0x0be1595,0x175cc12,0x033a39a } },
3398 /* 130 */
3399 { { 0x00a67d2,0x086d06f,0x248a0f1,0x0291134,0x362d476,0x166d1cd,
3400 0x044f1d6,0x2d2a038,0x365250b,0x0023f78 },
3401 { 0x08bf287,0x3b0f6a1,0x1d6eace,0x20b4cda,0x2c2a621,0x0912520,
3402 0x02dfdc9,0x1b35cd6,0x3d2565d,0x00bdf8b } },
3403 /* 131 */
3404 { { 0x3770fa7,0x2e4b6f0,0x03f9ae4,0x170de41,0x1095e8d,0x1dd845c,
3405 0x334e9d1,0x00ab953,0x12e9077,0x03196fa },
3406 { 0x2fd0a40,0x228c0fd,0x384b275,0x38ef339,0x3e7d822,0x3e5d9ef,
3407 0x24f5854,0x0ece9eb,0x247d119,0x012ffe3 } },
3408 /* 132 */
3409 { { 0x0ff1480,0x07487c0,0x1b16cd4,0x1f41d53,0x22ab8fb,0x2f83cfa,
3410 0x01d2efb,0x259f6b2,0x2e65772,0x00f9392 },
3411 { 0x05303e6,0x23cdb4f,0x23977e1,0x12e4898,0x03bd999,0x0c930f0,
3412 0x170e261,0x180a27b,0x2fd58ec,0x014e22b } },
3413 /* 133 */
3414 { { 0x25d7713,0x0c5fad7,0x09daad1,0x3b9d779,0x109b985,0x1d3ec98,
3415 0x35bc4fc,0x2f838cb,0x0d14f75,0x0173e42 },
3416 { 0x2657b12,0x10d4423,0x19e6760,0x296e5bb,0x2bfd421,0x25c3330,
3417 0x29f51f8,0x0338838,0x24060f0,0x029a62e } },
3418 /* 134 */
3419 { { 0x3748fec,0x2c5a1bb,0x2cf973d,0x289fa74,0x3e6e755,0x38997bf,
3420 0x0b6544c,0x2b6358c,0x38a7aeb,0x02c50bb },
3421 { 0x3d5770a,0x06be7c5,0x012fad3,0x19cb2cd,0x266af3b,0x3ccd677,
3422 0x160d1bd,0x141d5af,0x2965851,0x034625a } },
3423 /* 135 */
3424 { { 0x3c41c08,0x255eacc,0x22e1ec5,0x2b151a3,0x087de94,0x311cbdb,
3425 0x016b73a,0x368e462,0x20b7981,0x0099ec3 },
3426 { 0x262b988,0x1539763,0x21e76e5,0x15445b4,0x1d8ddc7,0x34a9be6,
3427 0x10faf03,0x24e4d18,0x07aa111,0x02d538a } },
3428 /* 136 */
3429 { { 0x38a876b,0x048ad45,0x04b40a0,0x3fc2144,0x251ff96,0x13ca7dd,
3430 0x0b31ab1,0x3539814,0x28b5f87,0x0212aec },
3431 { 0x270790a,0x350e7e0,0x346bd5e,0x276178f,0x22d6cb5,0x3078884,
3432 0x355c1b6,0x15901d7,0x3671765,0x03950db } },
3433 /* 137 */
3434 { { 0x286e8d5,0x2409788,0x13be53f,0x2d21911,0x0353c95,0x10238e8,
3435 0x32f5bde,0x3a67b60,0x28b5b9c,0x001013d },
3436 { 0x381e8e5,0x0cef7a9,0x2f5bcad,0x06058f0,0x33cdf50,0x04672a8,
3437 0x1769600,0x31c055d,0x3df0ac1,0x00e9098 } },
3438 /* 138 */
3439 { { 0x2eb596d,0x197b326,0x12b4c29,0x39c08f2,0x101ea03,0x3804e58,
3440 0x04b4b62,0x28d9d1c,0x13f905e,0x0032a3f },
3441 { 0x11b2b61,0x08e9095,0x0d06925,0x270e43f,0x21eb7a8,0x0e4a98f,
3442 0x31d2be0,0x030cf9f,0x2644ddb,0x025b728 } },
3443 /* 139 */
3444 { { 0x07510af,0x2ed0e8e,0x2a01203,0x2a2a68d,0x0846fea,0x3e540de,
3445 0x3a57702,0x1677348,0x2123aad,0x010d8f8 },
3446 { 0x0246a47,0x0e871d0,0x124dca4,0x34b9577,0x2b362b8,0x363ebe5,
3447 0x3086045,0x26313e6,0x15cd8bb,0x0210384 } },
3448 /* 140 */
3449 { { 0x023e8a7,0x0817884,0x3a0bf12,0x3376371,0x3c808a8,0x18e9777,
3450 0x12a2721,0x35b538a,0x2bd30de,0x017835a },
3451 { 0x0fc0f64,0x1c8709f,0x2d8807a,0x0743957,0x242eec0,0x347e76c,
3452 0x27bef91,0x289689a,0x0f42945,0x01f7a92 } },
3453 /* 141 */
3454 { { 0x1060a81,0x3dbc739,0x1615abd,0x1cbe3e5,0x3e79f9c,0x1ab09a2,
3455 0x136c540,0x05b473f,0x2beebfd,0x02af0a8 },
3456 { 0x3e2eac7,0x19be474,0x04668ac,0x18f4b74,0x36f10ba,0x0a0b4c6,
3457 0x10e3770,0x3bf059e,0x3946c7e,0x013a8d4 } },
3458 /* 142 */
3459 { { 0x266309d,0x28be354,0x1a3eed8,0x3020651,0x10a51c6,0x1e31770,
3460 0x0af45a5,0x3ff0f3b,0x2891c94,0x00e9db9 },
3461 { 0x17b0d0f,0x33a291f,0x0a5f9aa,0x25a3d61,0x2963ace,0x39a5fef,
3462 0x230c724,0x1919146,0x10a465e,0x02084a8 } },
3463 /* 143 */
3464 { { 0x3ab8caa,0x31870f3,0x2390ef7,0x2103850,0x218eb8e,0x3a5ccf2,
3465 0x1dff677,0x2c59334,0x371599c,0x02a9f2a },
3466 { 0x0837bd1,0x3249cef,0x35d702f,0x3430dab,0x1c06407,0x108f692,
3467 0x221292f,0x05f0c5d,0x073fe06,0x01038e0 } },
3468 /* 144 */
3469 { { 0x3bf9b7c,0x2020929,0x30d0f4f,0x080fef8,0x3365d23,0x1f3e738,
3470 0x3e53209,0x1549afe,0x300b305,0x038d811 },
3471 { 0x0c6c2c7,0x2e6445b,0x3ee64dc,0x022e932,0x0726837,0x0deb67b,
3472 0x1ed4346,0x3857f73,0x277a3de,0x01950b5 } },
3473 /* 145 */
3474 { { 0x36c377a,0x0adb41e,0x08be3f3,0x11e40d1,0x36cb038,0x036a2bd,
3475 0x3dd3a82,0x1bc875b,0x2ee09bb,0x02994d2 },
3476 { 0x035facf,0x05e0344,0x07e630a,0x0ce772d,0x335e55a,0x111fce4,
3477 0x250fe1c,0x3bc89ba,0x32fdc9a,0x03cf2d9 } },
3478 /* 146 */
3479 { { 0x355fd83,0x1c67f8e,0x1d10eb3,0x1b21d77,0x0e0d7a4,0x173a9e1,
3480 0x2c9fa90,0x1c39cce,0x22eaae8,0x01f2bea },
3481 { 0x153b338,0x0534107,0x26c69b8,0x283be1f,0x3e0acc0,0x059cac3,
3482 0x13d1081,0x148bbee,0x3c1b9bd,0x002aac4 } },
3483 /* 147 */
3484 { { 0x2681297,0x3389e34,0x146addc,0x2c6d425,0x2cb350e,0x1986abc,
3485 0x0431737,0x04ba4b7,0x2028470,0x012e469 },
3486 { 0x2f8ddcf,0x3c4255c,0x1af4dcf,0x07a6a44,0x208ebf6,0x0dc90c3,
3487 0x34360ac,0x072ad23,0x0537232,0x01254d3 } },
3488 /* 148 */
3489 { { 0x07b7e9d,0x3df5c7c,0x116f83d,0x28c4f35,0x3a478ef,0x3011fb8,
3490 0x2f264b6,0x317b9e3,0x04fd65a,0x032bd1b },
3491 { 0x2aa8266,0x3431de4,0x04bba04,0x19a44da,0x0edf454,0x392c5ac,
3492 0x265168a,0x1dc3d5b,0x25704c6,0x00533a7 } },
3493 /* 149 */
3494 { { 0x25e8f91,0x1178fa5,0x2492994,0x2eb2c3c,0x0d3aca1,0x0322828,
3495 0x1cc70f9,0x269c74c,0x0a53e4c,0x006edc2 },
3496 { 0x18bdd7a,0x2a79a55,0x26b1d5c,0x0200628,0x0734a05,0x3273c7b,
3497 0x13aa714,0x0040ac2,0x2f2da30,0x03e7449 } },
3498 /* 150 */
3499 { { 0x3f9563e,0x2f29eab,0x14a0749,0x3fad264,0x1dd077a,0x3d7c59c,
3500 0x3a0311b,0x331a789,0x0b9729e,0x0201ebf },
3501 { 0x1b08b77,0x2a4cdf2,0x3e387f8,0x21510f1,0x286c3a7,0x1dbf62e,
3502 0x3afa594,0x3363217,0x0d16568,0x01d46b7 } },
3503 /* 151 */
3504 { { 0x0715c0d,0x28e2d04,0x17f78ae,0x1c63dda,0x1d113ea,0x0fefc1b,
3505 0x1eab149,0x1d0fd99,0x0682537,0x00a7b11 },
3506 { 0x10bebbc,0x11c672d,0x14223d9,0x2ff9141,0x1399ee5,0x34b7b6c,
3507 0x0d5b3a8,0x01df643,0x0e392a4,0x03fe4dc } },
3508 /* 152 */
3509 { { 0x2b75b65,0x0b5a6f1,0x11c559a,0x3549999,0x24188f8,0x37a75f4,
3510 0x29f33e3,0x34068a2,0x38ba2a9,0x025dd91 },
3511 { 0x29af2c7,0x0988b64,0x0923885,0x1b539a4,0x1334f5d,0x226947a,
3512 0x2cc7e5a,0x20beb39,0x13fac2f,0x01d298c } },
3513 /* 153 */
3514 { { 0x35f079c,0x137f76d,0x2fbbb2f,0x254638d,0x185b07c,0x1f34db7,
3515 0x2cfcf0e,0x218f46d,0x2150ff4,0x02add6f },
3516 { 0x33fc9b7,0x0d9f005,0x0fd081b,0x0834965,0x2b90a74,0x102448d,
3517 0x3dbf03c,0x167d857,0x02e0b44,0x013afab } },
3518 /* 154 */
3519 { { 0x09f2c53,0x317f9d7,0x1411eb6,0x0463aba,0x0d25220,0x256b176,
3520 0x087633f,0x2bff322,0x07b2c1b,0x037e662 },
3521 { 0x10aaecb,0x23bb4a1,0x2272bb7,0x06c075a,0x09d4918,0x0736f2b,
3522 0x0dd511b,0x101625e,0x0a7779f,0x009ec10 } },
3523 /* 155 */
3524 { { 0x33b2eb2,0x0176dfd,0x2118904,0x022386c,0x2e0df85,0x2588c9f,
3525 0x1b71525,0x28fd540,0x137e4cf,0x02ce4f7 },
3526 { 0x3d75165,0x0c39ecf,0x3554a12,0x30af34c,0x2d66344,0x3ded408,
3527 0x36f1be0,0x0d065b0,0x012d046,0x0025623 } },
3528 /* 156 */
3529 { { 0x2601c3b,0x1824fc0,0x335fe08,0x3e33d70,0x0fb0252,0x252bfca,
3530 0x1cf2808,0x1922e55,0x1a9db9f,0x020721e },
3531 { 0x2f56c51,0x39a1f31,0x218c040,0x1a4fc5d,0x3fed471,0x0164d4e,
3532 0x388a419,0x06f1113,0x0f55fc1,0x03e8352 } },
3533 /* 157 */
3534 { { 0x1608e4d,0x3872778,0x022cbc6,0x044d60a,0x3010dda,0x15fb0b5,
3535 0x37ddc11,0x19f5bda,0x156b6a3,0x023a838 },
3536 { 0x383b3b4,0x1380bc8,0x353ca35,0x250fc07,0x169966b,0x3780f29,
3537 0x36632b2,0x2d6b13f,0x124fa00,0x00fd6ae } },
3538 /* 158 */
3539 { { 0x1739efb,0x2ec3656,0x2c0d337,0x3d39faf,0x1c751b0,0x04699f4,
3540 0x252dd64,0x095b8b6,0x0872b74,0x022f1da },
3541 { 0x2d3d253,0x38edca0,0x379fa5b,0x287d635,0x3a9f679,0x059d9ee,
3542 0x0ac168e,0x3cd3e87,0x19060fc,0x02ce1bc } },
3543 /* 159 */
3544 { { 0x3edcfc2,0x0f04d4b,0x2f0d31f,0x1898be2,0x25396bf,0x15ca230,
3545 0x02b4eae,0x2713668,0x0f71b06,0x0132d18 },
3546 { 0x38095ea,0x1ed34d6,0x3603ae6,0x165bf01,0x192bbf8,0x1852859,
3547 0x075f66b,0x1488f85,0x10895ef,0x014b035 } },
3548 /* 160 */
3549 { { 0x1339848,0x3084385,0x0c8d231,0x3a1c1de,0x0e87a28,0x255b85c,
3550 0x1de6616,0x2702e74,0x1382bb0,0x012b0f2 },
3551 { 0x198987d,0x381545a,0x34d619b,0x312b827,0x18b2376,0x28fe4cf,
3552 0x20b7651,0x017d077,0x0c7e397,0x00e0365 } },
3553 /* 161 */
3554 { { 0x1542e75,0x0d56aa0,0x39b701a,0x287b806,0x396c724,0x0935c21,
3555 0x3a29776,0x0debdac,0x171de26,0x00b38f8 },
3556 { 0x1d5bc1a,0x3fad27d,0x22b5cfe,0x1f89ddf,0x0a65560,0x144dd5b,
3557 0x2aac2f9,0x139353f,0x0520b62,0x00b9b36 } },
3558 /* 162 */
3559 { { 0x031c31d,0x16552e3,0x1a0c368,0x0016fc8,0x168533d,0x171e7b2,
3560 0x17626e7,0x275502f,0x14742c6,0x03285dd },
3561 { 0x2d2dbb2,0x3b6bffd,0x1d18cc6,0x2f45d2a,0x0fd0d8c,0x2915e3a,
3562 0x1e8793a,0x0b39a1d,0x3139cab,0x02a5da9 } },
3563 /* 163 */
3564 { { 0x3fb353d,0x147c6e4,0x3a720a6,0x22d5ff3,0x1d75cab,0x06c54a0,
3565 0x08cfa73,0x12666aa,0x3170a1f,0x021c829 },
3566 { 0x13e1b90,0x3a34dda,0x1fc38c3,0x02c5bdb,0x2d345dc,0x14aa1d0,
3567 0x28d00ab,0x224f23a,0x329c769,0x025c67b } },
3568 /* 164 */
3569 { { 0x0e35909,0x3bb6356,0x0116820,0x370cf77,0x29366d8,0x3881409,
3570 0x3999d06,0x013075f,0x176e157,0x02941ca },
3571 { 0x0e70b2e,0x28dfab1,0x2a8a002,0x15da242,0x084dcf6,0x116ca97,
3572 0x31bf186,0x1dc9735,0x09df7b7,0x0264e27 } },
3573 /* 165 */
3574 { { 0x2da7a4b,0x3023c9e,0x1366238,0x00ff4e2,0x03abe9d,0x19bd44b,
3575 0x272e897,0x20b91ad,0x2aa202c,0x02a2201 },
3576 { 0x380184e,0x08112b4,0x0b85660,0x31049aa,0x3a8cb78,0x36113c5,
3577 0x1670c0a,0x373f9e7,0x3fb4738,0x00010ef } },
3578 /* 166 */
3579 { { 0x2d5192e,0x26d770d,0x32af8d5,0x34d1642,0x1acf885,0x05805e0,
3580 0x166d0a1,0x1219a0d,0x301ba6c,0x014bcfb },
3581 { 0x2dcb64d,0x19cca83,0x379f398,0x08e01a0,0x10a482c,0x0103cc2,
3582 0x0be5fa7,0x1f9d45b,0x1899ef2,0x00ca5af } },
3583 /* 167 */
3584 { { 0x14d81d7,0x2aea251,0x1b3c476,0x3bd47ae,0x29eade7,0x0715e61,
3585 0x1a21cd8,0x1c7a586,0x2bfaee5,0x00ee43f },
3586 { 0x096f7cb,0x0c08f95,0x1bc4939,0x361fed4,0x255be41,0x26fad73,
3587 0x31dd489,0x02c600f,0x29d9f81,0x01ba201 } },
3588 /* 168 */
3589 { { 0x03ea1db,0x1eac46d,0x1292ce3,0x2a54967,0x20a7ff1,0x3e13c61,
3590 0x1b02218,0x2b44e14,0x3eadefa,0x029c88a },
3591 { 0x30a9144,0x31e3b0a,0x19c5a2a,0x147cbe9,0x05a0240,0x051f38e,
3592 0x11eca56,0x31a4247,0x123bc2a,0x02fa535 } },
3593 /* 169 */
3594 { { 0x3226ce7,0x1251782,0x0b7072f,0x11e59fa,0x2b8afd7,0x169b18f,
3595 0x2a46f18,0x31d9bb7,0x2fe9be8,0x01de0b7 },
3596 { 0x1b38626,0x34aa90f,0x3ad1760,0x21ddbd9,0x3460ae7,0x1126736,
3597 0x1b86fc5,0x0b92cd0,0x167a289,0x000e0e1 } },
3598 /* 170 */
3599 { { 0x1ec1a0f,0x36bbf5e,0x1c972d8,0x3f73ace,0x13bbcd6,0x23d86a5,
3600 0x175ffc5,0x2d083d5,0x2c4adf7,0x036f661 },
3601 { 0x1f39eb7,0x2a20505,0x176c81a,0x3d6e636,0x16ee2fc,0x3cbdc5f,
3602 0x25475dc,0x2ef4151,0x3c46860,0x0238934 } },
3603 /* 171 */
3604 { { 0x2587390,0x3639526,0x0588749,0x13c32fb,0x212bb19,0x09660f1,
3605 0x207da4b,0x2bf211b,0x1c4407b,0x01506a6 },
3606 { 0x24c8842,0x105a498,0x05ffdb2,0x0ab61b0,0x26044c1,0x3dff3d8,
3607 0x1d14b44,0x0d74716,0x049f57d,0x030024b } },
3608 /* 172 */
3609 { { 0x32e61ef,0x31d70f7,0x35cad3c,0x320b86c,0x07e8841,0x027ca7d,
3610 0x2d30d19,0x2513718,0x2347286,0x01d7901 },
3611 { 0x3c237d0,0x107f16e,0x01c9e7d,0x3c3b13c,0x0c9537b,0x20af54d,
3612 0x051a162,0x2161a47,0x258c784,0x016df2d } },
3613 /* 173 */
3614 { { 0x228ead1,0x29c2122,0x07f6964,0x023f4ed,0x1802dc5,0x19f96ce,
3615 0x24bfd17,0x25e866b,0x2ba8df0,0x01eb84f },
3616 { 0x2dd384e,0x05bbe3a,0x3f06fd2,0x366dacb,0x30361a2,0x2f36d7c,
3617 0x0b98784,0x38ff481,0x074e2a8,0x01e1f60 } },
3618 /* 174 */
3619 { { 0x17fbb1c,0x0975add,0x1debc5e,0x2cb2880,0x3e47bdd,0x3488cff,
3620 0x15e9a36,0x2121129,0x0199ef2,0x017088a },
3621 { 0x0315250,0x352a162,0x17c1773,0x0ae09c2,0x321b21a,0x3bd74cf,
3622 0x3c4ea1d,0x3cac2ad,0x3abbaf0,0x039174d } },
3623 /* 175 */
3624 { { 0x0511c8a,0x3c78d0a,0x2cd3d2d,0x322f729,0x3ebb229,0x09f0e69,
3625 0x0a71a76,0x2e74d5e,0x12284df,0x03b5ef0 },
3626 { 0x3dea561,0x0a9b7e4,0x0ed1cf2,0x237523c,0x05443f1,0x2eb48fa,
3627 0x3861405,0x1b49f62,0x0c945ca,0x02ab25f } },
3628 /* 176 */
3629 { { 0x16bd00a,0x13a9d28,0x3cc1eb5,0x2b7d702,0x2d839e9,0x3e6ff01,
3630 0x2bb7f11,0x3713824,0x3b31163,0x00c63e5 },
3631 { 0x30d7138,0x0316fb0,0x0220ecc,0x08eaf0c,0x244e8df,0x0088d81,
3632 0x37972fb,0x3fd34ae,0x2a19a84,0x03e907e } },
3633 /* 177 */
3634 { { 0x2642269,0x0b65d29,0x03bd440,0x33a6ede,0x3c81814,0x2507982,
3635 0x0d38e47,0x3a788e6,0x32c1d26,0x00e2eda },
3636 { 0x2577f87,0x392895a,0x3e1cc64,0x14f7047,0x08b52d2,0x08a01ca,
3637 0x336abf6,0x00697fc,0x105ce76,0x0253742 } },
3638 /* 178 */
3639 { { 0x293f92a,0x33df737,0x3315156,0x32e26d7,0x0a01333,0x26579d4,
3640 0x004df9c,0x0aba409,0x067d25c,0x02481de },
3641 { 0x3f39d44,0x1c78042,0x13d7e24,0x0825aed,0x35f2c90,0x3270f63,
3642 0x04b7b35,0x3ad4531,0x28bd29b,0x0207a10 } },
3643 /* 179 */
3644 { { 0x077199f,0x270aeb1,0x0dd96dd,0x3b9ad7b,0x28cb8ee,0x3903f43,
3645 0x37db3fe,0x292c62b,0x362dbbf,0x006e52a },
3646 { 0x247f143,0x0362cf3,0x216344f,0x3f18fd1,0x351e623,0x31664e0,
3647 0x0f270fc,0x243bbc6,0x2280555,0x001a8e3 } },
3648 /* 180 */
3649 { { 0x3355b49,0x2c04e6c,0x399b2e5,0x182d3af,0x020e265,0x09a7cf7,
3650 0x0ffa6bd,0x353e302,0x02083d9,0x029ecdb },
3651 { 0x33e8830,0x0570e86,0x1c0b64d,0x386a27e,0x0d5fcea,0x0b45a4c,
3652 0x2ee4a2e,0x0a8833f,0x2b4a282,0x02f9531 } },
3653 /* 181 */
3654 { { 0x191167c,0x36cf7e3,0x225ed6c,0x1e79e99,0x0517c3f,0x11ab1fd,
3655 0x05648f3,0x08aedc4,0x1abeae0,0x02fcc29 },
3656 { 0x3828a68,0x1e16fa4,0x30368e7,0x0c9fcfb,0x25161c3,0x24851ac,
3657 0x1b5feb5,0x344eb84,0x0de2732,0x0347208 } },
3658 /* 182 */
3659 { { 0x038b363,0x384d1e4,0x2519043,0x151ac17,0x158c11f,0x009b2b4,
3660 0x257abe6,0x2368d3f,0x3ed68a1,0x02df45e },
3661 { 0x29c2559,0x2962478,0x3d8444c,0x1d96fff,0x04f7a03,0x1391a52,
3662 0x0de4af7,0x3319126,0x15e6412,0x00e65ff } },
3663 /* 183 */
3664 { { 0x3d61507,0x1d1a0a2,0x0d2af20,0x354d299,0x329e132,0x2a28578,
3665 0x2ddfb08,0x04fa3ff,0x1293c6c,0x003bae2 },
3666 { 0x3e259f8,0x1a68fa9,0x3e67e9b,0x39b44f9,0x1ce1db7,0x347e9a1,
3667 0x3318f6a,0x2dbbc9d,0x2f8c922,0x008a245 } },
3668 /* 184 */
3669 { { 0x212ab5b,0x2b896c2,0x0136959,0x07e55ef,0x0cc1117,0x05b8ac3,
3670 0x18429ed,0x025fa01,0x11d6e93,0x03b016b },
3671 { 0x03f3708,0x2e96fab,0x1d77157,0x0d4c2d6,0x131baf9,0x0608d39,
3672 0x3552371,0x06cdd1e,0x1567ff1,0x01f4c50 } },
3673 /* 185 */
3674 { { 0x2dfefab,0x270173d,0x37077bd,0x1a372cd,0x1be2f22,0x28e2ee5,
3675 0x3ead973,0x35e8f94,0x2fc9bc1,0x03a7399 },
3676 { 0x36a02a1,0x2855d9b,0x00ed75a,0x37d8398,0x138c087,0x233706e,
3677 0x147f346,0x01947e2,0x3017228,0x0365942 } },
3678 /* 186 */
3679 { { 0x2057e60,0x2d31296,0x25e4504,0x2fa37bc,0x1cbccc3,0x1f0732f,
3680 0x3532081,0x2de8a98,0x19a804e,0x005359a },
3681 { 0x31f411a,0x2a10576,0x369c2c8,0x02fe035,0x109fbaf,0x30bddeb,
3682 0x1eef901,0x1662ad3,0x0410d43,0x01bd31a } },
3683 /* 187 */
3684 { { 0x2c24a96,0x1b7d3a5,0x19a3872,0x217f2f6,0x2534dbc,0x2cab8c2,
3685 0x066ef28,0x26aecf1,0x0fd6118,0x01310d4 },
3686 { 0x055b8da,0x1fdc5be,0x38a1296,0x25118f0,0x341a423,0x2ba4cd0,
3687 0x3e1413e,0x062d70d,0x2425a31,0x029c9b4 } },
3688 /* 188 */
3689 { { 0x08c1086,0x1acfba5,0x22e1dae,0x0f72f4e,0x3f1de50,0x0f408bc,
3690 0x35ed3f0,0x3ce48fc,0x282cc6c,0x004d8e7 },
3691 { 0x1afaa86,0x24e3ef3,0x22589ac,0x3ec9952,0x1f45bc5,0x14144ca,
3692 0x23b26e4,0x0d68c65,0x1e1c1a3,0x032a4d9 } },
3693 /* 189 */
3694 { { 0x03b2d20,0x16b1d53,0x241b361,0x05e4138,0x1742a54,0x32741c7,
3695 0x0521c4c,0x1ca96c2,0x034970b,0x02738a7 },
3696 { 0x13e0ad6,0x207dcdb,0x034c8cc,0x27bcbe1,0x18060da,0x33a18b6,
3697 0x2d1d1a6,0x2be60d7,0x3d7ab42,0x012312a } },
3698 /* 190 */
3699 { { 0x0c7485a,0x06c3310,0x0dbfd22,0x2ef949d,0x0ead455,0x098f4ba,
3700 0x3c76989,0x0cf2d24,0x032f67b,0x01e005f },
3701 { 0x30cb5ee,0x0d5da64,0x0ed2b9d,0x2503102,0x1c0d14e,0x1cbc693,
3702 0x37bf552,0x07013e2,0x054de5c,0x014f341 } },
3703 /* 191 */
3704 { { 0x128ccac,0x1617e97,0x346ebcd,0x158016d,0x25f823e,0x34048ea,
3705 0x39f0a1c,0x3ea3df1,0x1c1d3d7,0x03ba919 },
3706 { 0x151803b,0x01967c1,0x2f70781,0x27df39a,0x06c0b59,0x24a239c,
3707 0x15a7702,0x2464d06,0x2a47ae6,0x006db90 } },
3708 /* 192 */
3709 { { 0x27d04c3,0x024df3d,0x38112e8,0x38a27ba,0x01e312b,0x0965358,
3710 0x35d8879,0x2f4f55a,0x214187f,0x0008936 },
3711 { 0x05fe36f,0x2ee18c3,0x1f5f87a,0x1813bd4,0x0580f3c,0x0ed0a7b,
3712 0x0fb1bfb,0x3fcce59,0x2f042bf,0x01820e3 } },
3713 /* 193 */
3714 { { 0x20bbe99,0x32cbc9f,0x39ee432,0x3cc12a8,0x37bda44,0x3ea4e40,
3715 0x097c7a9,0x0590d7d,0x2022d33,0x018dbac },
3716 { 0x3ae00aa,0x3439864,0x2d2ffcf,0x3f8c6b9,0x0875a00,0x3e4e407,
3717 0x3658a29,0x22eb3d0,0x2b63921,0x022113b } },
3718 /* 194 */
3719 { { 0x33bae58,0x05c749a,0x1f3e114,0x1c45f8e,0x27db3df,0x06a3ab6,
3720 0x37bc7f8,0x1e27b34,0x3dc51fb,0x009eea0 },
3721 { 0x3f54de5,0x3d0e7fe,0x1a71a7d,0x02ed7f8,0x0727703,0x2ca5e92,
3722 0x2e8e35d,0x292ad0b,0x13487f3,0x02b6d8b } },
3723 /* 195 */
3724 { { 0x175df2a,0x05a28a8,0x32e99b1,0x13d8630,0x2082aa0,0x11ac245,
3725 0x24f2e71,0x322cb27,0x17675e7,0x02e643f },
3726 { 0x1f37313,0x2765ad3,0x0789082,0x1e742d0,0x11c2055,0x2021dc4,
3727 0x09ae4a7,0x346359b,0x2f94d10,0x0205c1f } },
3728 /* 196 */
3729 { { 0x3d6ff96,0x1f2ac80,0x336097d,0x3f03610,0x35b851b,0x010b6d2,
3730 0x0823c4d,0x2a9709a,0x2ead5a8,0x00de4b6 },
3731 { 0x01afa0b,0x0621965,0x3671528,0x1050b60,0x3f3e9e7,0x2f93829,
3732 0x0825275,0x006e85f,0x35e94b0,0x016af58 } },
3733 /* 197 */
3734 { { 0x2c4927c,0x3ea1382,0x0f23727,0x0d69f23,0x3e38860,0x2b72837,
3735 0x3cd5ea4,0x2d84292,0x321846a,0x016656f },
3736 { 0x29dfa33,0x3e182e0,0x018be90,0x2ba563f,0x2caafe2,0x218c0d9,
3737 0x3baf447,0x1047a6c,0x0a2d483,0x01130cb } },
3738 /* 198 */
3739 { { 0x00ed80c,0x2a5fc79,0x0a82a74,0x2c4c74b,0x15f938c,0x30b5ab6,
3740 0x32124b7,0x295314f,0x2fb8082,0x007c858 },
3741 { 0x20b173e,0x19f315c,0x12f97e4,0x198217c,0x040e8a6,0x3275977,
3742 0x2bc20e4,0x01f2633,0x02bc3e9,0x023c750 } },
3743 /* 199 */
3744 { { 0x3c4058a,0x24be73e,0x16704f5,0x2d8a4bd,0x3b15e14,0x3076315,
3745 0x1cfe37b,0x36fe715,0x343926e,0x02c6603 },
3746 { 0x2c76b09,0x0cf824c,0x3f7898c,0x274cec1,0x11df527,0x18eed18,
3747 0x08ead48,0x23915bc,0x19b3744,0x00a0a2b } },
3748 /* 200 */
3749 { { 0x0cf4ac5,0x1c8b131,0x0afb696,0x0ff7799,0x2f5ac1a,0x022420c,
3750 0x11baa2e,0x2ce4015,0x1275a14,0x0125cfc },
3751 { 0x22eac5d,0x360cd4c,0x3568e59,0x3d42f66,0x35e07ee,0x09620e4,
3752 0x36720fa,0x22b1eac,0x2d0db16,0x01b6b23 } },
3753 /* 201 */
3754 { { 0x1a835ef,0x1516bbb,0x2d51f7b,0x3487443,0x14aa113,0x0dd06c2,
3755 0x1a65e01,0x379300d,0x35920b9,0x012c8fb },
3756 { 0x04c7341,0x2eda00f,0x3c37e82,0x1b4fd62,0x0d45770,0x1478fba,
3757 0x127863a,0x26939cd,0x134ddf4,0x01375c5 } },
3758 /* 202 */
3759 { { 0x1476cd9,0x1119ca5,0x325bbf9,0x0bf8c69,0x0648d07,0x312d9f8,
3760 0x01c8b8f,0x136ec51,0x0002f4a,0x03f4c5c },
3761 { 0x195d0e1,0x10ffd22,0x29aa1cb,0x3443bdc,0x276e695,0x05e6260,
3762 0x15f9764,0x3cd9783,0x18c9569,0x0053eb1 } },
3763 /* 203 */
3764 { { 0x312ae18,0x280197c,0x3fc9ad9,0x303f324,0x251958d,0x29f4a11,
3765 0x2142408,0x3694366,0x25136ab,0x03b5f1d },
3766 { 0x1d4abbc,0x1c3c689,0x13ea462,0x3cfc684,0x39b5dd8,0x2d4654b,
3767 0x09b0755,0x27d4f18,0x3f74d2e,0x03fbf2d } },
3768 /* 204 */
3769 { { 0x2119185,0x2525eae,0x1ba4bd0,0x0c2ab11,0x1d54e8c,0x294845e,
3770 0x2479dea,0x3602d24,0x17e87e0,0x0060069 },
3771 { 0x0afffb0,0x34fe37f,0x1240073,0x02eb895,0x06cf33c,0x2d7f7ef,
3772 0x1d763b5,0x04191e0,0x11e1ead,0x027e3f0 } },
3773 /* 205 */
3774 { { 0x269544c,0x0e85c57,0x3813158,0x19fc12d,0x20eaf85,0x1e2930c,
3775 0x22a8fd2,0x1a6a478,0x09d3d3a,0x02a74e0 },
3776 { 0x1a2da3b,0x30b0b16,0x0847936,0x3d86257,0x138ccbc,0x0f5421a,
3777 0x25244e6,0x23bdd79,0x1aee117,0x00c01ae } },
3778 /* 206 */
3779 { { 0x1eead28,0x07cac32,0x1fbc0bb,0x17627d3,0x17eef63,0x0b3a24e,
3780 0x0757fdb,0x3dd841d,0x3d745f8,0x002ae17 },
3781 { 0x25b4549,0x29f24cf,0x2f21ecd,0x1725e48,0x04be2bb,0x10ee010,
3782 0x1a1274b,0x10b0898,0x27511e9,0x02c48b5 } },
3783 /* 207 */
3784 { { 0x2a5ae7a,0x181ef99,0x0be33be,0x3e9dab7,0x101e703,0x3adb971,
3785 0x1043014,0x2ebb2be,0x1c1097d,0x027d667 },
3786 { 0x3f250ed,0x16dc603,0x20dc6d7,0x1d0d268,0x38eb915,0x02c89e8,
3787 0x1605a41,0x12de109,0x0e08a29,0x01f554a } },
3788 /* 208 */
3789 { { 0x0c26def,0x163d988,0x2d1ef0f,0x3a960ac,0x1025585,0x0738e20,
3790 0x27d79b0,0x05cc3ef,0x201303f,0x00a333a },
3791 { 0x1644ba5,0x2af345e,0x30b8d1d,0x3a01bff,0x31fc643,0x1acf85e,
3792 0x0a76fc6,0x04efe98,0x348a1d0,0x03062eb } },
3793 /* 209 */
3794 { { 0x1c4216d,0x18e3217,0x02ac34e,0x19c8185,0x200c010,0x17d4192,
3795 0x13a1719,0x165af51,0x09db7a9,0x0277be0 },
3796 { 0x3ab8d2c,0x2190b99,0x22b641e,0x0cd88de,0x3b42404,0x1310862,
3797 0x106a6d6,0x23395f5,0x0b06880,0x000d5fe } },
3798 /* 210 */
3799 { { 0x0d2cc88,0x36f9913,0x339d8e9,0x237c2e3,0x0cc61c2,0x34c2832,
3800 0x309874c,0x2621d28,0x2dd1b48,0x0392806 },
3801 { 0x17cd8f9,0x07bab3d,0x0c482ed,0x0faf565,0x31b767d,0x2f4bde1,
3802 0x295c717,0x330c29c,0x179ce10,0x0119b5f } },
3803 /* 211 */
3804 { { 0x1ada2c7,0x0c624a7,0x227d47d,0x30e3e6a,0x14fa0a6,0x0829678,
3805 0x24fd288,0x2b46a43,0x122451e,0x0319ca9 },
3806 { 0x186b655,0x01f3217,0x0af1306,0x0efe6b5,0x2f0235d,0x1c45ca9,
3807 0x2086805,0x1d44e66,0x0faf2a6,0x0178f59 } },
3808 /* 212 */
3809 { { 0x33b4416,0x10431e6,0x2d99aa6,0x217aac9,0x0cd8fcf,0x2d95a9d,
3810 0x3ff74ad,0x10bf17a,0x295eb8e,0x01b229e },
3811 { 0x02a63bd,0x182e9ec,0x004710c,0x00e2e3c,0x06b2f23,0x04b642c,
3812 0x2c37383,0x32a4631,0x022ad82,0x00d22b9 } },
3813 /* 213 */
3814 { { 0x0cda2fb,0x1d198d7,0x26d27f4,0x286381c,0x022acca,0x24ac7c8,
3815 0x2df7824,0x0b4ba16,0x1e0d9ef,0x03041d3 },
3816 { 0x29a65b3,0x0f3912b,0x151bfcf,0x2b0175c,0x0fd71e4,0x39aa5e2,
3817 0x311f50c,0x13ff351,0x3dbc9e5,0x03eeb7e } },
3818 /* 214 */
3819 { { 0x0a99363,0x0fc7348,0x2775171,0x23db3c8,0x2b91565,0x134d66c,
3820 0x0175cd2,0x1bf365a,0x2b48371,0x02dfe5d },
3821 { 0x16dbf74,0x2389357,0x2f36575,0x3f5c70e,0x38d23ba,0x090f7f8,
3822 0x3477600,0x3201523,0x32ecafc,0x03d3506 } },
3823 /* 215 */
3824 { { 0x1abd48d,0x073ca3f,0x38a451f,0x0d8cb01,0x1ce81be,0x05c51ba,
3825 0x0e29741,0x03c41ab,0x0eae016,0x0060209 },
3826 { 0x2e58358,0x1da62d9,0x2358038,0x14b39b2,0x1635687,0x39079b1,
3827 0x380e345,0x1b49608,0x23983cf,0x019f97d } },
3828 /* 216 */
3829 { { 0x34899ef,0x332e373,0x04c0f89,0x3c27aed,0x1949015,0x09663b2,
3830 0x2f9276b,0x07f1951,0x09a04c1,0x027fbde },
3831 { 0x3d2a071,0x19fb3d4,0x1b096d3,0x1fe9146,0x3b10e1a,0x0478bbb,
3832 0x2b3fb06,0x1388329,0x181a99c,0x02f2030 } },
3833 /* 217 */
3834 { { 0x1eb82e6,0x14dbe39,0x3920972,0x31fd5b2,0x21a484f,0x02d7697,
3835 0x0e21715,0x37c431e,0x2629f8c,0x01249c3 },
3836 { 0x26b50ad,0x26deefa,0x0ffc1a3,0x30688e2,0x39a0284,0x041c65e,
3837 0x03eb178,0x0bdfd50,0x2f96137,0x034bb94 } },
3838 /* 218 */
3839 { { 0x0e0362a,0x334a162,0x194dd37,0x29e3e97,0x2442fa8,0x10d2949,
3840 0x3836e5a,0x2dccebf,0x0bee5ab,0x037ed1e },
3841 { 0x33eede6,0x3c739d9,0x2f04a91,0x350ad6c,0x3a5390a,0x14c368b,
3842 0x26f7bf5,0x11ce979,0x0b408df,0x0366850 } },
3843 /* 219 */
3844 { { 0x28ea498,0x0886d5b,0x2e090e0,0x0a4d58f,0x2623478,0x0d74ab7,
3845 0x2b83913,0x12c6b81,0x18d623f,0x01d8301 },
3846 { 0x198aa79,0x26d6330,0x3a7f0b8,0x34bc1ea,0x2f74890,0x378955a,
3847 0x204110f,0x0102538,0x02d8f19,0x01c5066 } },
3848 /* 220 */
3849 { { 0x14b0f45,0x2838cd3,0x14e16f0,0x0e0e4aa,0x2d9280b,0x0f18757,
3850 0x3324c6b,0x1391ceb,0x1ce89d5,0x00ebe74 },
3851 { 0x0930371,0x3de6048,0x3097fd8,0x1308705,0x3eda266,0x3108c26,
3852 0x1545dcd,0x1f7583a,0x1c37395,0x02c7e05 } },
3853 /* 221 */
3854 { { 0x1fec44a,0x2a9e3a2,0x0caf84f,0x11cf2a9,0x0c8c2ae,0x06da989,
3855 0x1c807dc,0x3c149a4,0x1141543,0x02906bb },
3856 { 0x15ffe04,0x0d4e65f,0x2e20424,0x37d896d,0x18bacb2,0x1e05ddd,
3857 0x1660be8,0x183be17,0x1dd86fb,0x035ba70 } },
3858 /* 222 */
3859 { { 0x2853264,0x0ba5fb1,0x0a0b3aa,0x2df88c1,0x2771533,0x23aba6f,
3860 0x112bb7b,0x3e3086e,0x210ae9b,0x027271b },
3861 { 0x030b74c,0x0269678,0x1e90a23,0x135a98c,0x24ed749,0x126de7c,
3862 0x344b23a,0x186da27,0x19640fa,0x0159af5 } },
3863 /* 223 */
3864 { { 0x18061f3,0x3004630,0x3c70066,0x34df20f,0x1190b25,0x1c9cc91,
3865 0x1fc8e02,0x0d17bc1,0x390f525,0x033cb1c },
3866 { 0x0eb30cf,0x2f3ad04,0x303aa09,0x2e835dd,0x1cfd2eb,0x143fc95,
3867 0x02c43a1,0x025e7a1,0x3558aa2,0x000bd45 } },
3868 /* 224 */
3869 { { 0x1db7d07,0x3bde52b,0x1500396,0x1089115,0x20b4fc7,0x1e2a8f3,
3870 0x3f8eacc,0x365f7eb,0x1a5e8d4,0x0053a6b },
3871 { 0x37079e2,0x120284b,0x000edaa,0x33792c2,0x145baa3,0x20e055f,
3872 0x365e2d7,0x26ba005,0x3ab8e9d,0x0282b53 } },
3873 /* 225 */
3874 { { 0x2653618,0x2dd8852,0x2a5f0bf,0x0f0c7aa,0x2187281,0x1252757,
3875 0x13e7374,0x3b47855,0x0b86e56,0x02f354c },
3876 { 0x2e9c47b,0x2fa14cc,0x19ab169,0x3fad401,0x0dc2776,0x24afeed,
3877 0x3a97611,0x0d07736,0x3cf6979,0x02424a0 } },
3878 /* 226 */
3879 { { 0x2e81a13,0x000c91d,0x123967b,0x265885c,0x29bee1a,0x0cb8675,
3880 0x2d361bd,0x1526823,0x3c9ace1,0x00d7bad },
3881 { 0x24e5bdc,0x02b969f,0x2c6e128,0x34edb3b,0x12dcd2c,0x3899af0,
3882 0x24224c6,0x3a1914b,0x0f4448a,0x026a2cb } },
3883 /* 227 */
3884 { { 0x1d03b59,0x1c6fc82,0x32abf64,0x28ed96b,0x1c90e62,0x2f57bb2,
3885 0x3ff168e,0x04de7fd,0x0f4d449,0x01af6d8 },
3886 { 0x255bc30,0x2bfaf22,0x3fe0dad,0x0584025,0x1c79ead,0x3078ef7,
3887 0x2197414,0x022a50b,0x0fd94ba,0x0007b0f } },
3888 /* 228 */
3889 { { 0x09485c2,0x09dfaf7,0x10c7ba6,0x1e48bec,0x248cc9a,0x028a362,
3890 0x21d60f7,0x193d93d,0x1c04754,0x0346b2c },
3891 { 0x2f36612,0x240ac49,0x0d8bd26,0x13b8186,0x259c3a4,0x020d5fb,
3892 0x38a8133,0x09b0937,0x39d4056,0x01f7341 } },
3893 /* 229 */
3894 { { 0x05a4b48,0x1f534fc,0x07725ce,0x148dc8c,0x2adcd29,0x04aa456,
3895 0x0f79718,0x066e346,0x189377d,0x002fd4d },
3896 { 0x068ea73,0x336569b,0x184d35e,0x32a08e9,0x3c7f3bb,0x11ce9c8,
3897 0x3674c6f,0x21bf27e,0x0d9e166,0x034a2f9 } },
3898 /* 230 */
3899 { { 0x0fa8e4b,0x2e6418e,0x18fc5d2,0x1ba24ff,0x0559f18,0x0dbedbf,
3900 0x2de2aa4,0x22338e9,0x3aa510f,0x035d801 },
3901 { 0x23a4988,0x02aad94,0x02732d1,0x111d374,0x0b455cf,0x0d01c9e,
3902 0x067082a,0x2ec05fd,0x368b303,0x03cad4b } },
3903 /* 231 */
3904 { { 0x035b4ca,0x1fabea6,0x1cbc0d5,0x3f2ed9a,0x02d2232,0x1990c66,
3905 0x2eb680c,0x3b4ea3b,0x18ecc5a,0x03636fa },
3906 { 0x1a02709,0x26f8ff1,0x1fa8cba,0x397d6e8,0x230be68,0x043aa14,
3907 0x3d43cdf,0x25c17fa,0x3a3ee55,0x0380564 } },
3908 /* 232 */
3909 { { 0x275a0a6,0x16bd43a,0x0033d3e,0x2b15e16,0x2512226,0x005d901,
3910 0x26d50fd,0x3bc19bf,0x3b1aeb8,0x02bfb01 },
3911 { 0x0bb0a31,0x26559e0,0x1aae7fb,0x330dcc2,0x16f1af3,0x06afce2,
3912 0x13a15a0,0x2ff7645,0x3546e2d,0x029c6e4 } },
3913 /* 233 */
3914 { { 0x0f593d2,0x384b806,0x122bbf8,0x0a281e0,0x1d1a904,0x2e93cab,
3915 0x0505db0,0x08f6454,0x05c6285,0x014e880 },
3916 { 0x3f2b935,0x22d8e79,0x161a07c,0x16b060a,0x02bff97,0x146328b,
3917 0x3ceea77,0x238f61a,0x19b3d58,0x02fd1f4 } },
3918 /* 234 */
3919 { { 0x17665d5,0x259e9f7,0x0de5672,0x15cbcbd,0x34e3030,0x035240f,
3920 0x0005ae8,0x286d851,0x07f39c9,0x000070b },
3921 { 0x1efc6d6,0x2a0051a,0x2724143,0x2a9ef1e,0x0c810bd,0x1e05429,
3922 0x25670ba,0x2e66d7d,0x0e786ff,0x03f6b7e } },
3923 /* 235 */
3924 { { 0x3c00785,0x232e23f,0x2b67fd3,0x244ed23,0x077fa75,0x3cda3ef,
3925 0x14d055b,0x0f25011,0x24d5aa4,0x00ea0e3 },
3926 { 0x297bb9a,0x198ca4f,0x14d9561,0x18d1076,0x39eb933,0x2b6caa0,
3927 0x1591a60,0x0768d45,0x257873e,0x00f36e0 } },
3928 /* 236 */
3929 { { 0x1e77eab,0x0502a5f,0x0109137,0x0350592,0x3f7e1c5,0x3ac7437,
3930 0x2dcad2c,0x1fee9d8,0x089f1f5,0x0169833 },
3931 { 0x0d45673,0x0d8e090,0x065580b,0x065644f,0x11b82be,0x3592dd0,
3932 0x3284b8d,0x23f0015,0x16fdbfd,0x0248bfd } },
3933 /* 237 */
3934 { { 0x1a129a1,0x1977bb2,0x0e041b2,0x15f30a1,0x0a5b1ce,0x3afef8f,
3935 0x380c46c,0x3358810,0x27df6c5,0x01ca466 },
3936 { 0x3b90f9a,0x3d14ea3,0x031b298,0x02e2390,0x2d719c0,0x25bc615,
3937 0x2c0e777,0x0226b8c,0x3803624,0x0179e45 } },
3938 /* 238 */
3939 { { 0x363cdfb,0x1bb155f,0x24fd5c1,0x1c7c72b,0x28e6a35,0x18165f2,
3940 0x226bea5,0x0beaff3,0x371e24c,0x0138294 },
3941 { 0x1765357,0x29034e9,0x22b4276,0x11035ce,0x23c89af,0x074468c,
3942 0x3370ae4,0x013bae3,0x018d566,0x03d7fde } },
3943 /* 239 */
3944 { { 0x209df21,0x0f8ff86,0x0e47fbf,0x23b99ba,0x126d5d2,0x2722405,
3945 0x16bd0a2,0x1799082,0x0e9533f,0x039077c },
3946 { 0x3ba9e3f,0x3f6902c,0x1895305,0x3ac9813,0x3f2340c,0x3c0d9f1,
3947 0x26e1927,0x0557c21,0x16eac4f,0x023b75f } },
3948 /* 240 */
3949 { { 0x3fc8ff3,0x0770382,0x342fc9a,0x0afa4db,0x314efd8,0x328e07b,
3950 0x016f7cc,0x3ba599c,0x1caed8a,0x0050cb0 },
3951 { 0x0b23c26,0x2120a5c,0x3273ec6,0x1cc1cd6,0x2a64fe8,0x2bbc3d6,
3952 0x09f6e5e,0x34b1b8e,0x00b5ac8,0x032bbd2 } },
3953 /* 241 */
3954 { { 0x1315922,0x1725e1d,0x0ca5524,0x1c4c18f,0x3d82951,0x193bcb2,
3955 0x0e60d0b,0x388dbcf,0x37e8efa,0x0342e85 },
3956 { 0x1b3af60,0x26ba3ec,0x220e53a,0x394f4b6,0x01a796a,0x3e7bbca,
3957 0x163605d,0x2b85807,0x17c1c54,0x03cc725 } },
3958 /* 242 */
3959 { { 0x1cc4597,0x1635492,0x2028c0f,0x2c2eb82,0x2dc5015,0x0d2a052,
3960 0x05fc557,0x1f0ebbf,0x0cb96e1,0x0004d01 },
3961 { 0x1a824bf,0x3896172,0x2ed7b29,0x178007a,0x0d59318,0x07bda2b,
3962 0x2ee6826,0x0f9b235,0x04b9193,0x01bcddf } },
3963 /* 243 */
3964 { { 0x0333fd2,0x0eeb46a,0x15b89f9,0x00968aa,0x2a89302,0x2bdd6b3,
3965 0x1e5037e,0x2541884,0x24ed2d0,0x01b6e8f },
3966 { 0x04399cd,0x3be6334,0x3adea48,0x1bb9adc,0x31811c6,0x05fb2bc,
3967 0x360752c,0x3d29dcb,0x3423bec,0x03c4f3c } },
3968 /* 244 */
3969 { { 0x119e2eb,0x2e7b02a,0x0f68cee,0x257d8b0,0x183a9a1,0x2ae88a6,
3970 0x3a3bb67,0x2eb4f3e,0x1a9274b,0x0320fea },
3971 { 0x2fa1ce0,0x346c2d8,0x2fbf0d7,0x3d4d063,0x0e58b60,0x09c1bc1,
3972 0x28ef9e5,0x09a0efe,0x0f45d70,0x02d275c } },
3973 /* 245 */
3974 { { 0x2d5513b,0x31d443e,0x1e2d914,0x3b2c5d4,0x105f32e,0x27ee756,
3975 0x050418d,0x3c73db6,0x1bb0c30,0x01673eb },
3976 { 0x1cb7fd6,0x1eb08d5,0x26a3e16,0x2e20810,0x0249367,0x029e219,
3977 0x2ec58c9,0x12d9fab,0x362354a,0x016eafc } },
3978 /* 246 */
3979 { { 0x2424865,0x260747b,0x177f37c,0x1e3cb95,0x08b0028,0x2783016,
3980 0x2970f1b,0x323c1c0,0x2a79026,0x0186231 },
3981 { 0x0f244da,0x26866f4,0x087306f,0x173ec20,0x31ecced,0x3c84d8d,
3982 0x070f9b9,0x2e764d5,0x075df50,0x0264ff9 } },
3983 /* 247 */
3984 { { 0x32c3609,0x0c737e6,0x14ea68e,0x300b11b,0x184eb19,0x29dd440,
3985 0x09ec1a9,0x185adeb,0x0664c80,0x0207dd9 },
3986 { 0x1fbe978,0x30a969d,0x33561d7,0x34fc60e,0x36743fe,0x00774af,
3987 0x0d1f045,0x018360e,0x12a5fe9,0x01592a0 } },
3988 /* 248 */
3989 { { 0x2817d1d,0x2993d3e,0x2e0f7a5,0x112faa0,0x255f968,0x355fe6a,
3990 0x3f5a0fc,0x075b2d7,0x3cf00e5,0x0089afc },
3991 { 0x32833cf,0x06a7e4b,0x09a8d6d,0x1693d3e,0x320a0a3,0x3cfdfdd,
3992 0x136c498,0x1e0d845,0x347ff25,0x01a1de7 } },
3993 /* 249 */
3994 { { 0x3043d08,0x030705c,0x20fa79b,0x1d07f00,0x0a54467,0x29b49b4,
3995 0x367e289,0x0b82f4d,0x0d1eb09,0x025ef2c },
3996 { 0x32ed3c3,0x1baaa3c,0x3c482ab,0x146ca06,0x3c8a4f1,0x3e85e3c,
3997 0x1bf4f3b,0x1195534,0x3e80a78,0x02a1cbf } },
3998 /* 250 */
3999 { { 0x32b2086,0x2de4d68,0x3486b1a,0x03a0583,0x2e1eb71,0x2dab9af,
4000 0x10cd913,0x28daa6f,0x3fcb732,0x000a04a },
4001 { 0x3605318,0x3f5f2b3,0x2d1da63,0x143f7f5,0x1646e5d,0x040b586,
4002 0x1683982,0x25abe87,0x0c9fe53,0x001ce47 } },
4003 /* 251 */
4004 { { 0x380d02b,0x055fc22,0x3f7fc50,0x3458a1d,0x26b8333,0x23550ab,
4005 0x0a1af87,0x0a821eb,0x2dc7e6d,0x00d574a },
4006 { 0x07386e1,0x3ccd68a,0x3275b41,0x253e390,0x2fd272a,0x1e6627a,
4007 0x2ca2cde,0x0e9e4a1,0x1e37c2a,0x00f70ac } },
4008 /* 252 */
4009 { { 0x0581352,0x2748701,0x02bed68,0x094dd9e,0x30a00c8,0x3fb5c07,
4010 0x3bd5909,0x211ac80,0x1103ccd,0x0311e1a },
4011 { 0x0c768ed,0x29dc209,0x36575db,0x009a107,0x272feea,0x2b33383,
4012 0x313ed56,0x134c9cc,0x168d5bb,0x033310a } },
4013 /* 253 */
4014 { { 0x17620b9,0x143784f,0x256a94e,0x229664a,0x1d89a5c,0x1d521f2,
4015 0x0076406,0x1c73f70,0x342aa48,0x03851fa },
4016 { 0x0f3ae46,0x2ad3bab,0x0fbe274,0x3ed40d4,0x2fd4936,0x232103a,
4017 0x2afe474,0x25b8f7c,0x047080e,0x008e6b0 } },
4018 /* 254 */
4019 { { 0x3fee8d4,0x347cd4a,0x0fec481,0x33fe9ec,0x0ce80b5,0x33a6bcf,
4020 0x1c4c9e2,0x3967441,0x1a3f5f7,0x03157e8 },
4021 { 0x257c227,0x1bc53a0,0x200b318,0x0fcd0af,0x2c5b165,0x2a413ec,
4022 0x2fc998a,0x2da6426,0x19cd4f4,0x0025336 } },
4023 /* 255 */
4024 { { 0x303beba,0x2072135,0x32918a9,0x140cb3a,0x08631d1,0x0ef527b,
4025 0x05f2c9e,0x2b4ce91,0x0b642ab,0x02e428c },
4026 { 0x0a5abf9,0x15013ed,0x3603b46,0x30dd76d,0x3004750,0x28d7627,
4027 0x1a42ccc,0x093ddbe,0x39a1b79,0x00067e2 } },
4028};
4029
4030/* Multiply the base point of P256 by the scalar and return the result.
4031 * If map is true then convert result to affine coordinates.
4032 *
4033 * r Resulting point.
4034 * k Scalar to multiply by.
4035 * map Indicates whether to convert result to affine.
4036 * heap Heap to use for allocation.
4037 * returns MEMORY_E when memory allocation fails and MP_OKAY on success.
4038 */
4039static int sp_256_ecc_mulmod_base_10(sp_point* r, const sp_digit* k,
4040 int map, void* heap)
4041{
4042 return sp_256_ecc_mulmod_stripe_10(r, &p256_base, p256_table,
4043 k, map, heap);
4044}
4045
4046#endif
4047
4048
4049#if defined(HAVE_ECC_SIGN) || defined(HAVE_ECC_VERIFY)
4050#endif
4051#if defined(HAVE_ECC_SIGN) || defined(HAVE_ECC_VERIFY)
4052/* Multiply a by scalar b into r. (r = a * b)
4053 *
4054 * r A single precision integer.
4055 * a A single precision integer.
4056 * b A scalar.
4057 */
4058SP_NOINLINE static void sp_256_mul_d_10(sp_digit* r, const sp_digit* a,
4059 sp_digit b)
4060{
4061#ifdef WOLFSSL_SP_SMALL
4062 int64_t tb = b;
4063 int64_t t = 0;
4064 int i;
4065
4066 for (i = 0; i < 10; i++) {
4067 t += tb * a[i];
4068 r[i] = t & 0x3ffffff;
4069 t >>= 26;
4070 }
4071 r[10] = (sp_digit)t;
4072#else
4073 int64_t tb = b;
4074 int64_t t[10];
4075
4076 t[ 0] = Q6_P_mpy_RR(tb, a[0]);
4077 t[ 1] = Q6_P_mpy_RR(tb, a[1]);
4078 t[ 2] = Q6_P_mpy_RR(tb, a[2]);
4079 t[ 3] = Q6_P_mpy_RR(tb, a[3]);
4080 t[ 4] = Q6_P_mpy_RR(tb, a[4]);
4081 t[ 5] = Q6_P_mpy_RR(tb, a[5]);
4082 t[ 6] = Q6_P_mpy_RR(tb, a[6]);
4083 t[ 7] = Q6_P_mpy_RR(tb, a[7]);
4084 t[ 8] = Q6_P_mpy_RR(tb, a[8]);
4085 t[ 9] = Q6_P_mpy_RR(tb, a[9]);
4086 r[ 0] = Q6_R_and_RR(t[ 0], 0x3ffffff);
4087 r[ 1] = (sp_digit)(t[ 0] >> 26) + Q6_R_and_RR(t[ 1], 0x3ffffff);
4088 r[ 2] = (sp_digit)(t[ 1] >> 26) + Q6_R_and_RR(t[ 2], 0x3ffffff);
4089 r[ 3] = (sp_digit)(t[ 2] >> 26) + Q6_R_and_RR(t[ 3], 0x3ffffff);
4090 r[ 4] = (sp_digit)(t[ 3] >> 26) + Q6_R_and_RR(t[ 4], 0x3ffffff);
4091 r[ 5] = (sp_digit)(t[ 4] >> 26) + Q6_R_and_RR(t[ 5], 0x3ffffff);
4092 r[ 6] = (sp_digit)(t[ 5] >> 26) + Q6_R_and_RR(t[ 6], 0x3ffffff);
4093 r[ 7] = (sp_digit)(t[ 6] >> 26) + Q6_R_and_RR(t[ 7], 0x3ffffff);
4094 r[ 8] = (sp_digit)(t[ 7] >> 26) + Q6_R_and_RR(t[ 8], 0x3ffffff);
4095 r[ 9] = (sp_digit)(t[ 8] >> 26) + Q6_R_and_RR(t[ 9], 0x3ffffff);
4096 r[10] = (sp_digit)(t[ 9] >> 26);
4097#endif /* WOLFSSL_SP_SMALL */
4098}
4099
4100#ifdef WOLFSSL_SP_DIV_32
4101static WC_INLINE sp_digit sp_256_div_word_10(sp_digit d1, sp_digit d0,
4102 sp_digit dv)
4103{
4104 sp_digit d, r, t, dv;
4105 int64_t t0, t1;
4106
4107 /* dv has 14 bits. */
4108 dv = (div >> 12) + 1;
4109 /* All 26 bits from d1 and top 5 bits from d0. */
4110 d = (d1 << 5) | (d0 >> 21);
4111 r = d / dv;
4112 d -= r * dv;
4113 /* Up to 17 bits in r */
4114 /* Next 9 bits from d0. */
4115 d <<= 9;
4116 r <<= 9;
4117 d |= (d0 >> 12) & ((1 << 9) - 1);
4118 t = d / dv;
4119 d -= t * dv;
4120 r += t;
4121 /* Up to 26 bits in r */
4122
4123 /* Handle rounding error with dv - top part */
4124 t0 = ((int64_t)d1 << 26) + d0;
4125 t1 = (int64_t)r * dv;
4126 t1 = t0 - t1;
4127 t = (sp_digit)(t1 >> 12) / dv;
4128 r += t;
4129
4130 /* Handle rounding error with dv - bottom 32 bits */
4131 t1 = (sp_digit)t0 - (r * dv);
4132 t = (sp_digit)t1 / dv;
4133 r += t;
4134
4135 return r;
4136}
4137#endif /* WOLFSSL_SP_DIV_32 */
4138
4139/* Divide d in a and put remainder into r (m*d + r = a)
4140 * m is not calculated as it is not needed at this time.
4141 *
4142 * a Number to be divided.
4143 * d Number to divide with.
4144 * m Multiplier result.
4145 * r Remainder from the division.
4146 * returns MEMORY_E when unable to allocate memory and MP_OKAY otherwise.
4147 */
4148static int sp_256_div_10(const sp_digit* a, const sp_digit* d, sp_digit* m,
4149 sp_digit* r)
4150{
4151 int i;
4152#ifndef WOLFSSL_SP_DIV_32
4153 int64_t d1;
4154#endif
4155 sp_digit dv, r1;
4156#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
4157 sp_digit* td;
4158#else
4159 sp_digit t1d[20], t2d[10 + 1];
4160#endif
4161 sp_digit* t1;
4162 sp_digit* t2;
4163 int err = MP_OKAY;
4164
4165 (void)m;
4166
4167#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
4168 td = (sp_digit*)XMALLOC(sizeof(sp_digit) * (3 * 10 + 1), NULL,
4169 DYNAMIC_TYPE_TMP_BUFFER);
4170 if (td == NULL) {
4171 err = MEMORY_E;
4172 }
4173#endif
4174
4175 if (err == MP_OKAY) {
4176#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
4177 t1 = td;
4178 t2 = td + 2 * 10;
4179#else
4180 t1 = t1d;
4181 t2 = t2d;
4182#endif
4183
4184 dv = d[9];
4185 XMEMCPY(t1, a, sizeof(*t1) * 2U * 10U);
4186 for (i=9; i>=0; i--) {
4187 t1[10 + i] += t1[10 + i - 1] >> 26;
4188 t1[10 + i - 1] = Q6_R_and_RR(t1[10 + i - 1], 0x3ffffff);
4189#ifndef WOLFSSL_SP_DIV_32
4190 d1 = t1[10 + i];
4191 d1 <<= 26;
4192 d1 += t1[10 + i - 1];
4193 r1 = (sp_digit)(d1 / dv);
4194#else
4195 r1 = sp_256_div_word_10(t1[10 + i], t1[10 + i - 1], dv);
4196#endif
4197
4198 sp_256_mul_d_10(t2, d, r1);
4199 (void)sp_256_sub_10(&t1[i], &t1[i], t2);
4200 t1[10 + i] -= t2[10];
4201 t1[10 + i] += t1[10 + i - 1] >> 26;
4202 t1[10 + i - 1] = Q6_R_and_RR(t1[10 + i - 1], 0x3ffffff);
4203 r1 = (((-t1[10 + i]) << 26) - t1[10 + i - 1]) / dv;
4204 r1++;
4205 sp_256_mul_d_10(t2, d, r1);
4206 (void)sp_256_add_10(&t1[i], &t1[i], t2);
4207 t1[10 + i] += t1[10 + i - 1] >> 26;
4208 t1[10 + i - 1] = Q6_R_and_RR(t1[10 + i - 1], 0x3ffffff);
4209 }
4210 t1[10 - 1] += t1[10 - 2] >> 26;
4211 t1[10 - 2] &= 0x3ffffff;
4212 d1 = t1[10 - 1];
4213 r1 = (sp_digit)(d1 / dv);
4214
4215 sp_256_mul_d_10(t2, d, r1);
4216 (void)sp_256_sub_10(t1, t1, t2);
4217 XMEMCPY(r, t1, sizeof(*r) * 2U * 10U);
4218 for (i=0; i<8; i++) {
4219 r[i+1] += r[i] >> 26;
4220 r[i] &= 0x3ffffff;
4221 }
4222 sp_256_cond_add_10(r, r, d, 0 - ((r[9] < 0) ?
4223 (sp_digit)1 : (sp_digit)0));
4224 }
4225
4226#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
4227 XFREE(td, NULL, DYNAMIC_TYPE_TMP_BUFFER);
4228#endif
4229
4230 return err;
4231}
4232
4233/* Reduce a modulo m into r. (r = a mod m)
4234 *
4235 * r A single precision number that is the reduced result.
4236 * a A single precision number that is to be reduced.
4237 * m A single precision number that is the modulus to reduce with.
4238 * returns MEMORY_E when unable to allocate memory and MP_OKAY otherwise.
4239 */
4240static int sp_256_mod_10(sp_digit* r, const sp_digit* a, const sp_digit* m)
4241{
4242 return sp_256_div_10(a, m, NULL, r);
4243}
4244
4245#endif
4246#if defined(HAVE_ECC_SIGN) || defined(HAVE_ECC_VERIFY)
4247#ifdef WOLFSSL_SP_SMALL
4248/* Order-2 for the P256 curve. */
4249static const word32 p256_order_2[8] = {
4250 0xfc63254fU,0xf3b9cac2U,0xa7179e84U,0xbce6faadU,0xffffffffU,0xffffffffU,
4251 0x00000000U,0xffffffffU
4252};
4253#else
4254/* The low half of the order-2 of the P256 curve. */
4255static const word32 p256_order_low[4] = {
4256 0xfc63254fU,0xf3b9cac2U,0xa7179e84U,0xbce6faadU
4257};
4258#endif /* WOLFSSL_SP_SMALL */
4259
4260/* Multiply two number mod the order of P256 curve. (r = a * b mod order)
4261 *
4262 * r Result of the multiplication.
4263 * a First operand of the multiplication.
4264 * b Second operand of the multiplication.
4265 */
4266static void sp_256_mont_mul_order_10(sp_digit* r, const sp_digit* a, const sp_digit* b)
4267{
4268 sp_256_mul_10(r, a, b);
4269 sp_256_mont_reduce_order_10(r, p256_order, p256_mp_order);
4270}
4271
4272/* Square number mod the order of P256 curve. (r = a * a mod order)
4273 *
4274 * r Result of the squaring.
4275 * a Number to square.
4276 */
4277static void sp_256_mont_sqr_order_10(sp_digit* r, const sp_digit* a)
4278{
4279 sp_256_sqr_10(r, a);
4280 sp_256_mont_reduce_order_10(r, p256_order, p256_mp_order);
4281}
4282
4283#ifndef WOLFSSL_SP_SMALL
4284/* Square number mod the order of P256 curve a number of times.
4285 * (r = a ^ n mod order)
4286 *
4287 * r Result of the squaring.
4288 * a Number to square.
4289 */
4290static void sp_256_mont_sqr_n_order_10(sp_digit* r, const sp_digit* a, int n)
4291{
4292 int i;
4293
4294 sp_256_mont_sqr_order_10(r, a);
4295 for (i=1; i<n; i++) {
4296 sp_256_mont_sqr_order_10(r, r);
4297 }
4298}
4299#endif /* !WOLFSSL_SP_SMALL */
4300
4301/* Invert the number, in Montgomery form, modulo the order of the P256 curve.
4302 * (r = 1 / a mod order)
4303 *
4304 * r Inverse result.
4305 * a Number to invert.
4306 * td Temporary data.
4307 */
4308static void sp_256_mont_inv_order_10(sp_digit* r, const sp_digit* a,
4309 sp_digit* td)
4310{
4311#ifdef WOLFSSL_SP_SMALL
4312 sp_digit* t = td;
4313 int i;
4314
4315 XMEMCPY(t, a, sizeof(sp_digit) * 10);
4316 for (i=254; i>=0; i--) {
4317 sp_256_mont_sqr_order_10(t, t);
4318 if ((p256_order_2[i / 32] & ((sp_int_digit)1 << (i % 32))) != 0) {
4319 sp_256_mont_mul_order_10(t, t, a);
4320 }
4321 }
4322 XMEMCPY(r, t, sizeof(sp_digit) * 10U);
4323#else
4324 sp_digit* t = td;
4325 sp_digit* t2 = td + 2 * 10;
4326 sp_digit* t3 = td + 4 * 10;
4327 int i;
4328
4329
4330 /* t = a^2 */
4331 sp_256_mont_sqr_order_10(t, a);
4332 /* t = a^3 = t * a */
4333 sp_256_mont_mul_order_10(t, t, a);
4334 /* t2= a^c = t ^ 2 ^ 2 */
4335 sp_256_mont_sqr_n_order_10(t2, t, 2);
4336 /* t3= a^f = t2 * t */
4337 sp_256_mont_mul_order_10(t3, t2, t);
4338 /* t2= a^f0 = t3 ^ 2 ^ 4 */
4339 sp_256_mont_sqr_n_order_10(t2, t3, 4);
4340 /* t = a^ff = t2 * t3 */
4341 sp_256_mont_mul_order_10(t, t2, t3);
4342 /* t3= a^ff00 = t ^ 2 ^ 8 */
4343 sp_256_mont_sqr_n_order_10(t2, t, 8);
4344 /* t = a^ffff = t2 * t */
4345 sp_256_mont_mul_order_10(t, t2, t);
4346 /* t2= a^ffff0000 = t ^ 2 ^ 16 */
4347 sp_256_mont_sqr_n_order_10(t2, t, 16);
4348 /* t = a^ffffffff = t2 * t */
4349 sp_256_mont_mul_order_10(t, t2, t);
4350 /* t2= a^ffffffff0000000000000000 = t ^ 2 ^ 64 */
4351 sp_256_mont_sqr_n_order_10(t2, t, 64);
4352 /* t2= a^ffffffff00000000ffffffff = t2 * t */
4353 sp_256_mont_mul_order_10(t2, t2, t);
4354 /* t2= a^ffffffff00000000ffffffff00000000 = t2 ^ 2 ^ 32 */
4355 sp_256_mont_sqr_n_order_10(t2, t2, 32);
4356 /* t2= a^ffffffff00000000ffffffffffffffff = t2 * t */
4357 sp_256_mont_mul_order_10(t2, t2, t);
4358 /* t2= a^ffffffff00000000ffffffffffffffffbce6 */
4359
4360 for (i=127; i>=112; i--) {
4361 sp_256_mont_sqr_order_10(t2, t2);
4362 if (((sp_digit)p256_order_low[i / 32] & ((sp_int_digit)1 << (i % 32))) != 0) {
4363 sp_256_mont_mul_order_10(t2, t2, a);
4364 }
4365 }
4366 /* t2= a^ffffffff00000000ffffffffffffffffbce6f */
4367 sp_256_mont_sqr_n_order_10(t2, t2, 4);
4368 sp_256_mont_mul_order_10(t2, t2, t3);
4369 /* t2= a^ffffffff00000000ffffffffffffffffbce6faada7179e84 */
4370 for (i=107; i>=64; i--) {
4371 sp_256_mont_sqr_order_10(t2, t2);
4372 if (((sp_digit)p256_order_low[i / 32] & ((sp_int_digit)1 << (i % 32))) != 0) {
4373 sp_256_mont_mul_order_10(t2, t2, a);
4374 }
4375 }
4376 /* t2= a^ffffffff00000000ffffffffffffffffbce6faada7179e84f */
4377 sp_256_mont_sqr_n_order_10(t2, t2, 4);
4378 sp_256_mont_mul_order_10(t2, t2, t3);
4379 /* t2= a^ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2 */
4380 for (i=59; i>=32; i--) {
4381 sp_256_mont_sqr_order_10(t2, t2);
4382 if (((sp_digit)p256_order_low[i / 32] & ((sp_int_digit)1 << (i % 32))) != 0) {
4383 sp_256_mont_mul_order_10(t2, t2, a);
4384 }
4385 }
4386 /* t2= a^ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2f */
4387 sp_256_mont_sqr_n_order_10(t2, t2, 4);
4388 sp_256_mont_mul_order_10(t2, t2, t3);
4389 /* t2= a^ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc63254 */
4390 for (i=27; i>=0; i--) {
4391 sp_256_mont_sqr_order_10(t2, t2);
4392 if (((sp_digit)p256_order_low[i / 32] & ((sp_int_digit)1 << (i % 32))) != 0) {
4393 sp_256_mont_mul_order_10(t2, t2, a);
4394 }
4395 }
4396 /* t2= a^ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632540 */
4397 sp_256_mont_sqr_n_order_10(t2, t2, 4);
4398 /* r = a^ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc63254f */
4399 sp_256_mont_mul_order_10(r, t2, t3);
4400#endif /* WOLFSSL_SP_SMALL */
4401}
4402
4403#endif /* HAVE_ECC_SIGN || HAVE_ECC_VERIFY */
4404
4405#ifdef HAVE_ECC_VERIFY
4406
4407
4408/* Verify the signature values with the hash and public key.
4409 * e = Truncate(hash, 256)
4410 * u1 = e/s mod order
4411 * u2 = r/s mod order
4412 * r == (u1.G + u2.Q)->x mod order
4413 * Optimization: Leave point in projective form.
4414 * (x, y, 1) == (x' / z'*z', y' / z'*z'*z', z' / z')
4415 * (r + n*order).z'.z' mod prime == (u1.G + u2.Q)->x'
4416 * The hash is truncated to the first 256 bits.
4417 *
4418 * hash Hash to sign.
4419 * hashLen Length of the hash data.
4420 * rng Random number generator.
4421 * priv Private part of key - scalar.
4422 * rm First part of result as an mp_int.
4423 * sm Sirst part of result as an mp_int.
4424 * heap Heap to use for allocation.
4425 * returns RNG failures, MEMORY_E when memory allocation fails and
4426 * MP_OKAY on success.
4427 */
4428int wolfSSL_DSP_ECC_Verify_256(remote_handle64 h, int32 *u1, int hashLen, int32* r, int rSz, int32* s, int sSz,
4429 int32* x, int xSz, int32* y, int ySz, int32* z, int zSz, int* res)
4430{
4431#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
4432 sp_digit* d = NULL;
4433#else
4434 sp_digit u2d[2*10] __attribute__((aligned(128)));
4435 sp_digit tmpd[2*10 * 5] __attribute__((aligned(128)));
4436 sp_point p1d;
4437 sp_point p2d;
4438#endif
4439 sp_digit* u2 = NULL;
4440 sp_digit* tmp = NULL;
4441 sp_point* p1;
4442 sp_point* p2 = NULL;
4443 sp_digit carry;
4444 int32_t c;
4445 int err;
4446 void* heap = NULL;
4447
4448 (void)h;
4449 (void)hashLen;
4450
4451 err = sp_ecc_point_new(heap, p1d, p1);
4452 if (err == MP_OKAY) {
4453 err = sp_ecc_point_new(heap, p2d, p2);
4454 }
4455
4456 if (err == MP_OKAY) {
4457 u2 = u2d;
4458 tmp = tmpd;
4459
4460 XMEMCPY(u2, r, 40);
4461 XMEMCPY(p2->x, x, 40);
4462 XMEMCPY(p2->y, y, 40);
4463 XMEMCPY(p2->z, z, 40);
4464
4465 sp_256_mul_10(s, s, p256_norm_order);
4466 err = sp_256_mod_10(s, s, p256_order);
4467 }
4468 if (err == MP_OKAY) {
4469 sp_256_norm_10(s);
4470 {
4471
4472 sp_256_mont_inv_order_10(s, s, tmp);
4473 sp_256_mont_mul_order_10(u1, u1, s);
4474 sp_256_mont_mul_order_10(u2, u2, s);
4475 }
4476
4477 err = sp_256_ecc_mulmod_base_10(p1, u1, 0, heap);
4478 }
4479 if (err == MP_OKAY) {
4480 err = sp_256_ecc_mulmod_10(p2, p2, u2, 0, heap);
4481 }
4482
4483 if (err == MP_OKAY) {
4484 sp_256_proj_point_add_10(p1, p1, p2, tmp);
4485
4486 /* (r + n*order).z'.z' mod prime == (u1.G + u2.Q)->x' */
4487 /* Reload r and convert to Montgomery form. */
4488 XMEMCPY(u2, r, 40);
4489 err = sp_256_mod_mul_norm_10(u2, u2, p256_mod);
4490 }
4491
4492 if (err == MP_OKAY) {
4493 /* u1 = r.z'.z' mod prime */
4494 sp_256_mont_sqr_10(p1->z, p1->z, p256_mod, p256_mp_mod);
4495 sp_256_mont_mul_10(u1, u2, p1->z, p256_mod, p256_mp_mod);
4496 *res = (int)(sp_256_cmp_10(p1->x, u1) == 0);
4497 if (*res == 0) {
4498 /* Reload r and add order. */
4499 XMEMCPY(u2, r, 40);
4500 carry = sp_256_add_10(u2, u2, p256_order);
4501 /* Carry means result is greater than mod and is not valid. */
4502 if (carry == 0) {
4503 sp_256_norm_10(u2);
4504
4505 /* Compare with mod and if greater or equal then not valid. */
4506 c = sp_256_cmp_10(u2, p256_mod);
4507 if (c < 0) {
4508 /* Convert to Montogomery form */
4509 err = sp_256_mod_mul_norm_10(u2, u2, p256_mod);
4510 if (err == MP_OKAY) {
4511 /* u1 = (r + 1*order).z'.z' mod prime */
4512 sp_256_mont_mul_10(u1, u2, p1->z, p256_mod,
4513 p256_mp_mod);
4514 *res = (int)(sp_256_cmp_10(p1->x, u2) == 0);
4515 }
4516 }
4517 }
4518 }
4519 }
4520
4521#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
4522 XFREE(d, heap, DYNAMIC_TYPE_ECC);
4523#endif
4524 sp_ecc_point_free(p1, 0, heap);
4525 sp_ecc_point_free(p2, 0, heap);
4526
4527 return err;
4528}
4529
4530/** Free the Fixed Point cache */
4531void wc_ecc_fp_free(void)
4532{
4533}
4534
4535
4536AEEResult wolfSSL_open(const char *uri, remote_handle64 *handle)
4537{
4538 /* can be any value or ignored, rpc layer doesn't care
4539 * also ok
4540 * *handle = 0;
4541 * *handle = 0xdeadc0de;
4542 */
4543 *handle = (remote_handle64)XMALLOC(1, NULL, DYNAMIC_TYPE_ECC);
4544 return 0;
4545}
4546
4547AEEResult wolfSSL_close(remote_handle64 handle)
4548{
4549 if (handle)
4550 XFREE((void*)handle, NULL, DYNAMIC_TYPE_ECC);
4551 return 0;
4552}
4553#endif /* HAVE_ECC_VERIFY */
4554
4555#ifdef WOLFSSL_PUBLIC_ECC_ADD_DBL
4556/* Add two projective EC points together.
4557 * (pX, pY, pZ) + (qX, qY, qZ) = (rX, rY, rZ)
4558 *
4559 * pX First EC point's X ordinate.
4560 * pY First EC point's Y ordinate.
4561 * pZ First EC point's Z ordinate.
4562 * qX Second EC point's X ordinate.
4563 * qY Second EC point's Y ordinate.
4564 * qZ Second EC point's Z ordinate.
4565 * rX Resultant EC point's X ordinate.
4566 * rY Resultant EC point's Y ordinate.
4567 * rZ Resultant EC point's Z ordinate.
4568 * returns MEMORY_E if dynamic memory allocation fails and MP_OKAY otherwise.
4569 */
4570int sp_ecc_proj_add_point_256(mp_int* pX, mp_int* pY, mp_int* pZ,
4571 mp_int* qX, mp_int* qY, mp_int* qZ,
4572 mp_int* rX, mp_int* rY, mp_int* rZ)
4573{
4574#if !defined(WOLFSSL_SP_SMALL) && !defined(WOLFSSL_SMALL_STACK)
4575 sp_digit tmpd[2 * 10 * 5];
4576 sp_point pd;
4577 sp_point qd;
4578#endif
4579 sp_digit* tmp;
4580 sp_point* p;
4581 sp_point* q = NULL;
4582 int err;
4583
4584 err = sp_ecc_point_new(NULL, pd, p);
4585 if (err == MP_OKAY) {
4586 err = sp_ecc_point_new(NULL, qd, q);
4587 }
4588#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
4589 if (err == MP_OKAY) {
4590 tmp = (sp_digit*)XMALLOC(sizeof(sp_digit) * 2 * 10 * 5, NULL,
4591 DYNAMIC_TYPE_ECC);
4592 if (tmp == NULL) {
4593 err = MEMORY_E;
4594 }
4595 }
4596#else
4597 tmp = tmpd;
4598#endif
4599
4600 if (err == MP_OKAY) {
4601 sp_256_from_mp(p->x, 10, pX);
4602 sp_256_from_mp(p->y, 10, pY);
4603 sp_256_from_mp(p->z, 10, pZ);
4604 sp_256_from_mp(q->x, 10, qX);
4605 sp_256_from_mp(q->y, 10, qY);
4606 sp_256_from_mp(q->z, 10, qZ);
4607
4608 sp_256_proj_point_add_10(p, p, q, tmp);
4609 }
4610
4611 if (err == MP_OKAY) {
4612 err = sp_256_to_mp(p->x, rX);
4613 }
4614 if (err == MP_OKAY) {
4615 err = sp_256_to_mp(p->y, rY);
4616 }
4617 if (err == MP_OKAY) {
4618 err = sp_256_to_mp(p->z, rZ);
4619 }
4620
4621#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
4622 XFREE(tmp, NULL, DYNAMIC_TYPE_ECC);
4623#endif
4624 sp_ecc_point_free(q, 0, NULL);
4625 sp_ecc_point_free(p, 0, NULL);
4626
4627 return err;
4628}
4629
4630
4631/* Double a projective EC point.
4632 * (pX, pY, pZ) + (pX, pY, pZ) = (rX, rY, rZ)
4633 *
4634 * pX EC point's X ordinate.
4635 * pY EC point's Y ordinate.
4636 * pZ EC point's Z ordinate.
4637 * rX Resultant EC point's X ordinate.
4638 * rY Resultant EC point's Y ordinate.
4639 * rZ Resultant EC point's Z ordinate.
4640 * returns MEMORY_E if dynamic memory allocation fails and MP_OKAY otherwise.
4641 */
4642int sp_ecc_proj_dbl_point_256(mp_int* pX, mp_int* pY, mp_int* pZ,
4643 mp_int* rX, mp_int* rY, mp_int* rZ)
4644{
4645#if !defined(WOLFSSL_SP_SMALL) && !defined(WOLFSSL_SMALL_STACK)
4646 sp_digit tmpd[2 * 10 * 2];
4647 sp_point pd;
4648#endif
4649 sp_digit* tmp;
4650 sp_point* p;
4651 int err;
4652
4653 err = sp_ecc_point_new(NULL, pd, p);
4654#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
4655 if (err == MP_OKAY) {
4656 tmp = (sp_digit*)XMALLOC(sizeof(sp_digit) * 2 * 10 * 2, NULL,
4657 DYNAMIC_TYPE_ECC);
4658 if (tmp == NULL) {
4659 err = MEMORY_E;
4660 }
4661 }
4662#else
4663 tmp = tmpd;
4664#endif
4665
4666 if (err == MP_OKAY) {
4667 sp_256_from_mp(p->x, 10, pX);
4668 sp_256_from_mp(p->y, 10, pY);
4669 sp_256_from_mp(p->z, 10, pZ);
4670
4671 sp_256_proj_point_dbl_10(p, p, tmp);
4672 }
4673
4674 if (err == MP_OKAY) {
4675 err = sp_256_to_mp(p->x, rX);
4676 }
4677 if (err == MP_OKAY) {
4678 err = sp_256_to_mp(p->y, rY);
4679 }
4680 if (err == MP_OKAY) {
4681 err = sp_256_to_mp(p->z, rZ);
4682 }
4683
4684#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
4685 XFREE(tmp, NULL, DYNAMIC_TYPE_ECC);
4686#endif
4687 sp_ecc_point_free(p, 0, NULL);
4688
4689 return err;
4690}
4691
4692/* Map a projective EC point to affine in place.
4693 * pZ will be one.
4694 *
4695 * pX EC point's X ordinate.
4696 * pY EC point's Y ordinate.
4697 * pZ EC point's Z ordinate.
4698 * returns MEMORY_E if dynamic memory allocation fails and MP_OKAY otherwise.
4699 */
4700int sp_ecc_map_256(mp_int* pX, mp_int* pY, mp_int* pZ)
4701{
4702#if !defined(WOLFSSL_SP_SMALL) && !defined(WOLFSSL_SMALL_STACK)
4703 sp_digit tmpd[2 * 10 * 4];
4704 sp_point pd;
4705#endif
4706 sp_digit* tmp;
4707 sp_point* p;
4708 int err;
4709
4710 err = sp_ecc_point_new(NULL, pd, p);
4711#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
4712 if (err == MP_OKAY) {
4713 tmp = (sp_digit*)XMALLOC(sizeof(sp_digit) * 2 * 10 * 4, NULL,
4714 DYNAMIC_TYPE_ECC);
4715 if (tmp == NULL) {
4716 err = MEMORY_E;
4717 }
4718 }
4719#else
4720 tmp = tmpd;
4721#endif
4722 if (err == MP_OKAY) {
4723 sp_256_from_mp(p->x, 10, pX);
4724 sp_256_from_mp(p->y, 10, pY);
4725 sp_256_from_mp(p->z, 10, pZ);
4726
4727 sp_256_map_10(p, p, tmp);
4728 }
4729
4730 if (err == MP_OKAY) {
4731 err = sp_256_to_mp(p->x, pX);
4732 }
4733 if (err == MP_OKAY) {
4734 err = sp_256_to_mp(p->y, pY);
4735 }
4736 if (err == MP_OKAY) {
4737 err = sp_256_to_mp(p->z, pZ);
4738 }
4739
4740#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
4741 XFREE(tmp, NULL, DYNAMIC_TYPE_ECC);
4742#endif
4743 sp_ecc_point_free(p, 0, NULL);
4744
4745 return err;
4746}
4747#endif /* WOLFSSL_PUBLIC_ECC_ADD_DBL */
4748#ifdef HAVE_COMP_KEY
4749/* Find the square root of a number mod the prime of the curve.
4750 *
4751 * y The number to operate on and the result.
4752 * returns MEMORY_E if dynamic memory allocation fails and MP_OKAY otherwise.
4753 */
4754static int sp_256_mont_sqrt_10(sp_digit* y)
4755{
4756#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
4757 sp_digit* d;
4758#else
4759 sp_digit t1d[2 * 10];
4760 sp_digit t2d[2 * 10];
4761#endif
4762 sp_digit* t1;
4763 sp_digit* t2;
4764 int err = MP_OKAY;
4765
4766#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
4767 d = (sp_digit*)XMALLOC(sizeof(sp_digit) * 4 * 10, NULL, DYNAMIC_TYPE_ECC);
4768 if (d == NULL) {
4769 err = MEMORY_E;
4770 }
4771#endif
4772
4773 if (err == MP_OKAY) {
4774#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
4775 t1 = d + 0 * 10;
4776 t2 = d + 2 * 10;
4777#else
4778 t1 = t1d;
4779 t2 = t2d;
4780#endif
4781
4782 {
4783 /* t2 = y ^ 0x2 */
4784 sp_256_mont_sqr_10(t2, y, p256_mod, p256_mp_mod);
4785 /* t1 = y ^ 0x3 */
4786 sp_256_mont_mul_10(t1, t2, y, p256_mod, p256_mp_mod);
4787 /* t2 = y ^ 0xc */
4788 sp_256_mont_sqr_n_10(t2, t1, 2, p256_mod, p256_mp_mod);
4789 /* t1 = y ^ 0xf */
4790 sp_256_mont_mul_10(t1, t1, t2, p256_mod, p256_mp_mod);
4791 /* t2 = y ^ 0xf0 */
4792 sp_256_mont_sqr_n_10(t2, t1, 4, p256_mod, p256_mp_mod);
4793 /* t1 = y ^ 0xff */
4794 sp_256_mont_mul_10(t1, t1, t2, p256_mod, p256_mp_mod);
4795 /* t2 = y ^ 0xff00 */
4796 sp_256_mont_sqr_n_10(t2, t1, 8, p256_mod, p256_mp_mod);
4797 /* t1 = y ^ 0xffff */
4798 sp_256_mont_mul_10(t1, t1, t2, p256_mod, p256_mp_mod);
4799 /* t2 = y ^ 0xffff0000 */
4800 sp_256_mont_sqr_n_10(t2, t1, 16, p256_mod, p256_mp_mod);
4801 /* t1 = y ^ 0xffffffff */
4802 sp_256_mont_mul_10(t1, t1, t2, p256_mod, p256_mp_mod);
4803 /* t1 = y ^ 0xffffffff00000000 */
4804 sp_256_mont_sqr_n_10(t1, t1, 32, p256_mod, p256_mp_mod);
4805 /* t1 = y ^ 0xffffffff00000001 */
4806 sp_256_mont_mul_10(t1, t1, y, p256_mod, p256_mp_mod);
4807 /* t1 = y ^ 0xffffffff00000001000000000000000000000000 */
4808 sp_256_mont_sqr_n_10(t1, t1, 96, p256_mod, p256_mp_mod);
4809 /* t1 = y ^ 0xffffffff00000001000000000000000000000001 */
4810 sp_256_mont_mul_10(t1, t1, y, p256_mod, p256_mp_mod);
4811 sp_256_mont_sqr_n_10(y, t1, 94, p256_mod, p256_mp_mod);
4812 }
4813 }
4814
4815#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
4816 XFREE(d, NULL, DYNAMIC_TYPE_ECC);
4817#endif
4818
4819 return err;
4820}
4821
4822/* Uncompress the point given the X ordinate.
4823 *
4824 * xm X ordinate.
4825 * odd Whether the Y ordinate is odd.
4826 * ym Calculated Y ordinate.
4827 * returns MEMORY_E if dynamic memory allocation fails and MP_OKAY otherwise.
4828 */
4829int sp_ecc_uncompress_256(mp_int* xm, int odd, mp_int* ym)
4830{
4831#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
4832 sp_digit* d;
4833#else
4834 sp_digit xd[2 * 10];
4835 sp_digit yd[2 * 10];
4836#endif
4837 sp_digit* x = NULL;
4838 sp_digit* y = NULL;
4839 int err = MP_OKAY;
4840
4841#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
4842 d = (sp_digit*)XMALLOC(sizeof(sp_digit) * 4 * 10, NULL, DYNAMIC_TYPE_ECC);
4843 if (d == NULL) {
4844 err = MEMORY_E;
4845 }
4846#endif
4847
4848 if (err == MP_OKAY) {
4849#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
4850 x = d + 0 * 10;
4851 y = d + 2 * 10;
4852#else
4853 x = xd;
4854 y = yd;
4855#endif
4856
4857 sp_256_from_mp(x, 10, xm);
4858 err = sp_256_mod_mul_norm_10(x, x, p256_mod);
4859 }
4860 if (err == MP_OKAY) {
4861 /* y = x^3 */
4862 {
4863 sp_256_mont_sqr_10(y, x, p256_mod, p256_mp_mod);
4864 sp_256_mont_mul_10(y, y, x, p256_mod, p256_mp_mod);
4865 }
4866 /* y = x^3 - 3x */
4867 sp_256_mont_sub_10(y, y, x, p256_mod);
4868 sp_256_mont_sub_10(y, y, x, p256_mod);
4869 sp_256_mont_sub_10(y, y, x, p256_mod);
4870 /* y = x^3 - 3x + b */
4871 err = sp_256_mod_mul_norm_10(x, p256_b, p256_mod);
4872 }
4873 if (err == MP_OKAY) {
4874 sp_256_mont_add_10(y, y, x, p256_mod);
4875 /* y = sqrt(x^3 - 3x + b) */
4876 err = sp_256_mont_sqrt_10(y);
4877 }
4878 if (err == MP_OKAY) {
4879 XMEMSET(y + 10, 0, 10U * sizeof(sp_digit));
4880 sp_256_mont_reduce_10(y, p256_mod, p256_mp_mod);
4881 if ((((word32)y[0] ^ (word32)odd) & 1U) != 0U) {
4882 sp_256_mont_sub_10(y, p256_mod, y, p256_mod);
4883 }
4884
4885 err = sp_256_to_mp(y, ym);
4886 }
4887
4888#if defined(WOLFSSL_SP_SMALL) || defined(WOLFSSL_SMALL_STACK)
4889 XFREE(d, NULL, DYNAMIC_TYPE_ECC);
4890#endif
4891
4892 return err;
4893}
4894#endif
4895#endif /* !WOLFSSL_SP_NO_256 */
4896#endif /* WOLFSSL_HAVE_SP_ECC */
4897#endif /* WOLFSSL_DSP */
4898#endif /* WOLFSSL_HAVE_SP_ECC */
4899