Skip to content

Commit 36da2d8

Browse files
committed
Merge branch 'feature-pkg'
2 parents 3256a5d + 2d8466a commit 36da2d8

File tree

14 files changed

+525
-122
lines changed

14 files changed

+525
-122
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ build/
2020
MANIFEST
2121
dist/
2222
*.egg-info/
23-
*.svg
2423
.vagrant
2524
.pytest_cache/
2625
.cache/
2726
.eggs
2827
private_keys
28+
images/SLIP39.iconset

GNUmakefile

Lines changed: 65 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ app-zip: dist/SLIP39-$(VERSION).app.zip
6969

7070
# Generate, Sign and Pacakage the macOS SLIP39.app GUI package for App Store
7171
app-pkg: dist/SLIP39-$(VERSION).pkg
72+
app-pkg-signed: dist/SLIP39-$(VERSION)-signed.pkg
7273

7374
#
7475
# Build a deployable macOS App
@@ -78,23 +79,48 @@ app-upload: dist/SLIP39-$(VERSION).app.zip
7879
xcrun altool --validate-app -f $< -t osx --apiKey 5H98J7LKPC --apiIssuer 5f3b4519-83ae-4e01-8d31-f7db26f68290 \
7980
&& xcrun altool --upload-app -f $< -t osx --apiKey 5H98J7LKPC --apiIssuer 5f3b4519-83ae-4e01-8d31-f7db26f68290 \
8081

82+
# dist/SLIP39-$(VERSION).pkg: dist/SLIP39.app FORCE
83+
# pkgbuild --install-location /Applications --component $< $@
84+
85+
#--identifier $(BUNDLEID)
86+
# codesign -vvvv -R="anchor apple" $</Contents/MacOS/Python \
87+
# || codesign --deep --force --options=runtime --timestamp \
88+
# --entitlements ./SLIP39.metadata/entitlements.plist \
89+
# --sign "$(DEVID)" \
90+
# $< \
91+
# && codesign -vvvv -R="anchor apple" $</Contents/MacOS/Python
92+
# codesign -vvvv -R="anchor apple" $</Contents/MacOS/Python
93+
94+
# doesn't work... code is not signed by an apple-anchored Dev. ID
8195
dist/SLIP39-$(VERSION).pkg: dist/SLIP39.app FORCE
82-
grep -q "CFBundleVersion" "$</Contents/Info.plist" || sed -i "" -e 's:<dict>:<dict>\n\t<key>CFBundleVersion</key>\n\t<string>0.0.0</string>:' "$</Contents/Info.plist"
83-
sed -i "" -e "s:0.0.0:$(VERSION):" "$</Contents/Info.plist"
84-
codesign --deep --force --options=runtime --timestamp \
85-
--entitlements ./SLIP39.metatdata/entitlements.plist \
86-
--sign "$(DEVID)" \
87-
$<
88-
codesign -dv -r- $<
89-
codesign -vv $<
90-
xcrun altool --validate-app -f $< -t osx --apiKey 5H98J7LKPC --apiIssuer 5f3b4519-83ae-4e01-8d31-f7db26f68290
91-
pkgbuild --install-location /Applications --component $< $@
96+
productbuild --sign "$(PKGID)" --timestamp \
97+
--identifier "$(BUNDLEID).pkg" \
98+
--version $(VERSION) \
99+
--component $< /Applications \
100+
$@
101+
xcrun altool --validate-app -f $@ -t osx --apiKey 5H98J7LKPC --apiIssuer 5f3b4519-83ae-4e01-8d31-f7db26f68290
92102

93103
dist/SLIP39-$(VERSION)-signed.pkg: dist/SLIP39-$(VERSION).pkg
94104
productsign --timestamp --sign "$(PKGID)" $< $@
95105
spctl -vv --assess --type install $@
96106

97107

108+
dist/SLIP39-$(VERSION).notarization: dist/SLIP39-$(VERSION).pkg
109+
xcrun altool --notarize-app -f $< \
110+
--team-id ZD8TVTCXDS \
111+
--primary-bundle-id ca.kundert.perry.SLIP39 \
112+
--apiKey 5H98J7LKPC --apiIssuer 5f3b4519-83ae-4e01-8d31-f7db26f68290 \
113+
--output-format json \
114+
> $@
115+
116+
dist/SLIP39-$(VERSION).status: FORCE # dist/SLIP39-$(VERSION).notarization
117+
xcrun altool \
118+
--apiKey 5H98J7LKPC --apiIssuer 5f3b4519-83ae-4e01-8d31-f7db26f68290 \
119+
--notarization-info $$( jq -r '.["RequestUUID"]' < dist/SLIP39-$(VERSION).notarization ) \
120+
| tee -a $@
121+
122+
123+
98124
#(cd dist; zip -r SLIP39.app-$(VERSION).zip SLIP39.app)
99125
# Create a ZIP archive suitable for notarization.
100126
dist/SLIP39-$(VERSION).app.zip: dist/SLIP39.app FORCE
@@ -113,14 +139,18 @@ dist/SLIP39-$(VERSION).app.zip: dist/SLIP39.app FORCE
113139
/usr/bin/ditto -c -k --keepParent "$<" "$@"
114140
@ls -last dist
115141

116-
# Rebuild the gui App; ensure we discard any partial/prior build and gui artifacts
117-
# The --onefile approach doesn't seem to work, as we need to sign things after packaging.
118-
# We need to customize the SLIP39.spec file (eg. for version), so we do not target SLIP39.py
119-
#
120-
dist/SLIP39.app: SLIP39.spec
142+
# Rebuild the gui App; ensure we discard any partial/prior build and gui artifacts The --onefile
143+
# approach doesn't seem to work, as we need to sign things after packaging. We need to customize
144+
# the SLIP39.spec file (eg. for version), so we do not target SLIP39.py (which would re-generate it
145+
# without our additions)
146+
#
147+
# Additional .spec file configurations:
148+
# - https://developer.apple.com/documentation/bundleresources/information_property_list/lsminimumsystemversion
149+
dist/SLIP39.app: SLIP39.spec images/SLIP39.icns
121150
rm -rf build $@*
122-
grep "version='$(VERSION)'" $< || sed -i "" -e "s/version='[0-9.]*'/version='$(VERSION)'/" $<
123-
pyinstaller $<
151+
sed -I "" -E "s/version=.*/version='$(VERSION)',/" $<
152+
sed -I "" -E "s/'CFBundleVersion':.*/'CFBundleVersion':'$(VERSION)',/" $<
153+
pyinstaller --noconfirm $<
124154

125155
# Only used for initial creation of SLIP39.spec.
126156
SLIP39.spec: SLIP39.py
@@ -131,6 +161,24 @@ SLIP39.spec: SLIP39.py
131161
--collect-data shamir_mnemonic \
132162
$<
133163

164+
# See: https://stackoverflow.com/questions/12306223/how-to-manually-create-icns-files-using-iconutil
165+
images/SLIP39.icns: images/SLIP39.iconset
166+
iconutil --convert icns -o $@ $<
167+
168+
images/SLIP39.iconset: images/SLIP39.png
169+
mkdir $@
170+
sips -z 16 16 $< --out $@/icon_16x16.png
171+
sips -z 32 32 $< --out $@/[email protected]
172+
sips -z 32 32 $< --out $@/icon_32x32.png
173+
sips -z 64 64 $< --out $@/[email protected]
174+
sips -z 128 128 $< --out $@/icon_128x128.png
175+
sips -z 256 256 $< --out $@/[email protected]
176+
sips -z 256 256 $< --out $@/icon_256x256.png
177+
sips -z 512 512 $< --out $@/[email protected]
178+
sips -z 512 512 $< --out $@/icon_512x512.png
179+
sips -z 1024 1024 $< --out $@/[email protected]
180+
181+
134182
# Support uploading a new version of slip32 to pypi. Must:
135183
# o advance __version__ number in slip32/version.py
136184
# o log in to your pypi account (ie. for package maintainer only)

README.pdf

49 Bytes
Binary file not shown.

SLIP39.metadata/entitlements.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>com.apple.security.app-sandbox</key>
6+
<true/>
57
</dict>
68
</plist>

SLIP39.spec

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ exe = EXE(pyz,
3737
disable_windowed_traceback=False,
3838
target_arch=None,
3939
codesign_identity='Developer ID Application: Perry Kundert (ZD8TVTCXDS)',
40-
entitlements_file=None )
40+
entitlements_file='SLIP39.metadata/entitlements.plist' )
4141
coll = COLLECT(exe,
4242
a.binaries,
4343
a.zipfiles,
@@ -50,5 +50,10 @@ app = BUNDLE(coll,
5050
name='SLIP39.app',
5151
icon='images/SLIP39.icns',
5252
bundle_identifier='ca.kundert.perry.SLIP39',
53-
version='6.2.0',
54-
)
53+
version='6.4.0',
54+
info_plist={
55+
'CFBundleVersion':'6.4.0',
56+
'LSApplicationCategoryType':'public.app-category.utilities',
57+
'LSMinimumSystemVersion':'10.15.0',
58+
})
59+

images/SLIP39.icns

145 KB
Binary file not shown.

images/SLIP39.png

109 KB
Loading

images/SLIP39.svg

Lines changed: 151 additions & 0 deletions
Loading

macOS.org

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,28 @@ nil
2222
#+BEGIN_ABSTRACT
2323
Creating Ethereum, Bitcoin and other accounts is complex and fraught with potential for loss of funds.
2424

25-
All Crypto wallets start with a "Seed": a large, random number that is used to generate all of the
26-
actual Bitcoin, Ethereum, etc. wallets.
25+
All Crypto wallets start with a "Seed": a large, random number used to generate all of the actual
26+
Bitcoin, Ethereum, etc. wallets.
2727

2828
The best practice for using these wallets is to load this "Seed" into a secure hardware device, like
29-
a Trezor hardware wallet.
29+
a Trezor hardware wallet. SLIP39 Mnemonic cards contain the recovery words, which are typed directly
30+
into the Trezor device to recover the Seed, and all of its accounts.
31+
32+
The macOS SLIP39 app helps you generate Mnemonic cards and back up this seed, securely and reliably,
33+
by distributing Mnemonic cards for the seed to partners, family and friends.
34+
35+
Later, if you (or your heirs!) need to recover the accounts, they can collect a sufficient threshold
36+
of the cards and regain access to the account.
3037
#+END_ABSTRACT
3138
#+TOC: headlines 2
3239

3340
* Security with Availability
3441

35-
For both BIP-39 and SLIP-39, a 128-bit random "seed" is the source of an unlimited sequence of
36-
Ethereum HD Wallet accounts. Anyone who can obtain this seed gains control of all Ethereum,
42+
For both BIP-39 and SLIP-39, a 128-bit or 256-bit random "Seed" is the source of an unlimited sequence of
43+
Ethereum HD Wallet accounts. Anyone who can obtain this Seed gains control of all Ethereum,
3744
Bitcoin (and other) accounts derived from it, so it must be securely stored.
3845

39-
Losing this seed means that all of the HD Wallet accounts are permanently lost. Therefore, it
46+
Losing this Seed means that all of the HD Wallet accounts are permanently lost. Therefore, it
4047
must be backed up reliably, and be readily accessible.
4148

4249
Therefore, we must:
@@ -45,3 +52,35 @@ a Trezor hardware wallet.
4552
- Store the seed in many places with several (some perhaps untrustworthy) people.
4653

4754
How can we address these conflicting requirements?
55+
56+
** SLIP-39 Mnemonic Recovery Cards
57+
58+
We don't recommend writing down one BIP-39 12-word or 24-word Mnemonic phrase, and hoping that
59+
*you* can find it, but that nobody else *ever* finds it!
60+
61+
Instead, generate a number of SLIP-39 Mnemonic cards, which can be collected to recover the Seed:
62+
#+CAPTION: SLIP39 Cards PDF
63+
#+ATTR_LATEX: :width 5in
64+
[[./images/slip39-pdf.png]]
65+
66+
67+
* Affiliate Links
68+
69+
To assist you in obtaining various SLIP39 compatible components, we have established some
70+
relationship with reliable vendors.
71+
72+
** Trezor
73+
74+
The [[https://shop.trezor.io/product/trezor-model-t?offer_id=15&aff_id=10388][Trezor Model T hardware wallet]] has built-in SLIP39 generation and recovery capability.
75+
76+
#+BEGIN_EXPORT html
77+
<a href="https://shop.trezor.io/product/trezor-model-t?offer_id=15&aff_id=10388&file_id=534" target="_blank"><img src="https://media.go2speed.org/brand/files/trezor/15/20210707060206-T1TT_banner_728x90_3.png" width="728" height="90" border="0" /></a><img src="http://trezor.go2cloud.org/aff_i?offer_id=15&file_id=534&aff_id=10388" width="0" height="0" style="position:absolute;visibility:hidden;" border="0" />
78+
#+END_EXPORT
79+
80+
#+BEGIN_EXPORT html
81+
<!-- Javascript Ad Tag: 1083 -->
82+
<div id="trezor1083SycVfv"></div>
83+
<script src="http://trezor.go2cloud.org/aff_ad?campaign_id=1083&aff_id=10388&format=js&divid=trezor1083SycVfv" type="text/javascript"></script>
84+
<!-- // End Ad Tag -->
85+
#+END_EXPORT
86+

macOS.pdf

233 KB
Binary file not shown.

0 commit comments

Comments
 (0)