cryptest-ios.sh on Apple platform

47 views
Skip to first unread message

Jeffrey Walton

unread,
Mar 6, 2021, 11:16:58 AM3/6/21
to Crypto++ Users

Hi Everyone,

I don't have a modern copy of Xcode. Mine is old at Xcode 8.2.

Could someone with a modern Xcode perform the following and report the results:

    cd cryptopp
    cp -p TestScripts/cryptest-ios.sh .
    ./cryptest-ios.sh 2>&1 | tee cryptest-ios.txt

Then compress the result and post it or email it to me.

    zip -9 cryptest-ios.txt.zip  cryptest-ios.txt

Jeff


Uri Blumenthal

unread,
Mar 7, 2021, 11:02:35 PM3/7/21
to cryptop...@googlegroups.com
You want cryptest-ios.sh run on macOS?

BTW, cryptest.sh fails to utilize assembly acceleration, because on macOS you have to tell Clang explicitly to use the proper arch flags, it didn't set them by default.


On Mar 6, 2021, at 11:17, Jeffrey Walton <nolo...@gmail.com> wrote:


--
You received this message because you are subscribed to "Crypto++ Users". More information about Crypto++ and this group is available at http://www.cryptopp.com and http://groups.google.com/forum/#!forum/cryptopp-users.
---
You received this message because you are subscribed to the Google Groups "Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cryptopp-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cryptopp-users/322a1f53-cccf-4268-baaf-6460146784b2n%40googlegroups.com.

Jeffrey Walton

unread,
Mar 8, 2021, 12:27:22 AM3/8/21
to Crypto++ Users
On Sunday, March 7, 2021 at 11:02:35 PM UTC-5 Mouse wrote:
You want cryptest-ios.sh run on macOS?

Yes.

BTW, cryptest.sh fails to utilize assembly acceleration, because on macOS you have to tell Clang explicitly to use the proper arch flags, it didn't set them by default.

Something does not sound right. The makefile should add the proper flags where needed, like -maes for AES on Intel and -march=armv8-a+crypto on ARM.

cryptest.sh tests code generation. The ARM AES tests are at https://github.com/weidai11/cryptopp/blob/master/TestScripts/cryptest.sh#L1683.

Jeff

Jeffrey Walton

unread,
Mar 8, 2021, 2:07:16 AM3/8/21
to Crypto++ Users List
There was a problem with the M1 platform. That was just corrected with
https://github.com/weidai11/cryptopp/commit/1f5d2f42ef53.

Jeff

Jeffrey Walton

unread,
Mar 8, 2021, 3:44:44 AM3/8/21
to Crypto++ Users
I just added code generation tests to cryptest-ios.sh. Output will look something like:

iPhoneOS:armv7 ==> SUCCESS
iPhoneOS:arm64 ==> SUCCESS
iPhoneOS:arm64 : AES ==> SUCCESS
iPhoneOS:arm64 : PMULL ==> SUCCESS
iPhoneOS:arm64 : SHA1 ==> SUCCESS
iPhoneOS:arm64 : SHA2 ==> SUCCESS
AppleTVOS:armv7 ==> SKIPPED
AppleTVOS:arm64 ==> SKIPPED
WatchOS:armv7 ==> SKIPPED
WatchOS:arm64 ==> SKIPPED
iPhoneSimulator:i386 ==> SUCCESS
iPhoneSimulator:x86_64 ==> SUCCESS
AppleTVSimulator:i386 ==> SKIPPED
AppleTVSimulator:x86_64 ==> SKIPPED
WatchSimulator:i386 ==> SKIPPED
WatchSimulator:x86_64 ==> SKIPPED

A lot of stuff is skipped because I don't have a modern Xcode installed. I can't upgrade this machine anymore. The UI is too sluggish or slow. I can only work from it over SSH.

Jeff

Devharsh Trivedi

unread,
Mar 9, 2021, 4:12:35 PM3/9/21
to Crypto++ Users
I have Xcode Version 12.4 (12D4e) and I downloaded Crypto++ 8.5.0

I see TestData/Programs/Vectors folders but don't have TestScripts

Jeffrey Walton

unread,
Mar 9, 2021, 4:18:58 PM3/9/21
to Crypto++ Users List
On Tue, Mar 9, 2021 at 4:12 PM Devharsh Trivedi <devhar...@gmail.com> wrote:
>
> I have Xcode Version 12.4 (12D4e) and I downloaded Crypto++ 8.5.0

You also need a few SDKs, like iPhoneOS, WatchOS, AppleTVOS.

> I see TestData/Programs/Vectors folders but don't have TestScripts

TestScripts can be found in Git master. We strip it out of the
distribution tarball.

git clone https://github.com/weidai11/cryptopp cryptopp-master
cd cryptopp-master
cp -p TestScripts/setenv-ios.sh .
cp -p TestScripts/cryptest-ios.sh .
./cryptest-ios.sh

Jeff

Devharsh Trivedi

unread,
Mar 9, 2021, 4:26:47 PM3/9/21
to cryptop...@googlegroups.com
% xcodebuild -showsdks
iOS SDKs:
iOS 14.4                      -sdk iphoneos14.4

iOS Simulator SDKs:
Simulator - iOS 14.4          -sdk iphonesimulator14.4

macOS SDKs:
DriverKit 20.2                -sdk driverkit.macosx20.2
macOS 11.1                    -sdk macosx11.1

tvOS SDKs:
tvOS 14.3                     -sdk appletvos14.3

tvOS Simulator SDKs:
Simulator - tvOS 14.3         -sdk appletvsimulator14.3

watchOS SDKs:
watchOS 7.2                   -sdk watchos7.2

watchOS Simulator SDKs:
Simulator - watchOS 7.2       -sdk watchsimulator7.2

Regards,
Devharsh.

--
You received this message because you are subscribed to a topic in the Google Groups "Crypto++ Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cryptopp-users/kCnbSeALXWw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cryptopp-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cryptopp-users/CAH8yC8nwaA-KGv3%2B5M53Z51Gm4v3Nm2XzCYmuNXbPCD7CeSyBw%40mail.gmail.com.

Devharsh Trivedi

unread,
Mar 9, 2021, 7:06:56 PM3/9/21
to cryptop...@googlegroups.com
=====================================================
iPhoneOS:armv7 ==> SUCCESS
iPhoneOS:arm64 ==> SUCCESS
iPhoneOS:arm64 : AES ==> SUCCESS
iPhoneOS:arm64 : PMULL ==> SUCCESS
iPhoneOS:arm64 : SHA1 ==> SUCCESS
iPhoneOS:arm64 : SHA2 ==> SUCCESS
AppleTVOS:armv7 ==> FAILURE
AppleTVOS:arm64 ==> SUCCESS
AppleTVOS:arm64 : AES ==> SUCCESS
AppleTVOS:arm64 : PMULL ==> SUCCESS
AppleTVOS:arm64 : SHA1 ==> SUCCESS
AppleTVOS:arm64 : SHA2 ==> SUCCESS
WatchOS:armv7 ==> FAILURE
WatchOS:arm64 ==> FAILURE
WatchOS:arm64 : AES ==> FAILURE
WatchOS:arm64 : PMULL ==> FAILURE
WatchOS:arm64 : SHA1 ==> FAILURE
WatchOS:arm64 : SHA2 ==> FAILURE
iPhoneSimulator:i386 ==> SUCCESS
iPhoneSimulator:x86_64 ==> SUCCESS
AppleTVSimulator:i386 ==> FAILURE
AppleTVSimulator:x86_64 ==> SUCCESS
WatchSimulator:i386 ==> SUCCESS
WatchSimulator:x86_64 ==> SUCCESS

cryptest-ios.txt.zip

Jeffrey Walton

unread,
Mar 9, 2021, 7:20:58 PM3/9/21
to Crypto++ Users List
Did you get an output file?

Can I get remote access to the build machine using SSH? (I can trade
you access to an Apple M1 over SSH).

Or, why did these three fail:

* AppleTVOS:armv7 ==> FAILURE
* WatchOS:armv7 ==> FAILURE
* WatchOS:arm64 ==> FAILURE

Jeff

Devharsh Trivedi

unread,
Mar 9, 2021, 7:22:48 PM3/9/21
to cryptop...@googlegroups.com
I sent you output file

Sending again here — 
cryptest-ios.txt.zip

Jeffrey Walton

unread,
Mar 9, 2021, 8:08:27 PM3/9/21
to Crypto++ Users List
On Tue, Mar 9, 2021 at 7:22 PM Devharsh Trivedi <devhar...@gmail.com> wrote:
>
> I sent you output file

Yes, thanks. I missed it the first time around.

Re: WatchOS... I've seen similar errors before. Do you know what a
typical value for -mappletvos-version-min is? (I've tried 6 through
10, but none of them are correct).

Jeff
Reply all
Reply to author
Forward
0 new messages