Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate private keys generated #7793

Closed
1 of 2 tasks
ghost opened this issue Jul 18, 2018 · 4 comments
Closed
1 of 2 tasks

Duplicate private keys generated #7793

ghost opened this issue Jul 18, 2018 · 4 comments
Labels
bug Something went wrong. multiplayer Related to the multiplayer functionality of OpenRCT2. regression An issue that was made since the last release.
Milestone

Comments

@ghost
Copy link

ghost commented Jul 18, 2018

OS: OSX 10.13.6
Version: develop
Commit/Build: 1a27fbb

I noticed some strange behavior when joining multiplayer servers today.

When I start from a fresh/blank OpenRCT2 install, set my name, and join a server, the application generates a private key as I would expect. It also generates a file with extension .pubkey. However, the two files are identical.

15:27 $ ls keys/
User-0304d6c606dsade7d4102237a96b78986a4ab471.pubkey	User.pri
~/Library/Application Support/OpenRCT2 
15:27 $ cat keys/*
-----BEGIN RSA PRIVATE KEY-----
MIICXgIBAAKBgQC2Lp6L7SXbf5zYTw7vbrODkTDqlymOXYks0HzImIE2ZKjWJE8m
wsmP/dEpRW3Raq9ZijQBVbkFLCa7yuxpdL0vYe2NoWn74m/HY03Np5LyuIN67LLY
JpZqLZZlsVion18C+VIbuOh+Ml9+s+UY9DC917eq/5c1MsDsPe94Gq+V7wIDAQAB
AoGBAKO1yOtcs8RHLJ6EjJtEEzSLaDWsdMVB8F7BCyEHSjWixsWH40iliZNHNomr
xj+FawU/V/RLH/Qx9KyUcVVifg1uBGFin+SPa2o2z/qd+KUAHtEEkKJ6ZBAX0JQE
xLIUhDvmwOfdn7xebObER1JqCzFFD56wZsan80ShE6hoIcZBAkEA2J/xj812WFzP
EgKS8OQIAHEqmHUGHFty7P0OLfbDupOKDWcH1Cs1UAPcOZDENT9FgDvmzonD95bL
WGVTurtvSQJBANdL+lCVlmQd4eUh6OnBG+NnEvzcXcE+K/j508cWVPhPq2/5jOJK
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Z9YhbjlAFAkEAj2wtzULkOwGxXkxGKfWsQvXqluVlfCy4YdfElQbg
1WO1i9Oqo0YjgDD964ucmsdNNshxmwPfTwWmo7jaNkvCFA==
-----END RSA PRIVATE KEY-----
  • Reproducible in RCT2 (vanilla)?
  • Specific to multiplayer?

Steps to reproduce:

  1. Delete OpenRCT2 keys folder if exists
  2. Join any server

I'm trying to give my public key to a server administrator, but it looks like two private keys have been generated. This seems strange to me. Is it expected and if so, can someone explain?

@janisozaur
Copy link
Member

Likely a regression from #7609, can you retry with a build prior to that PR getting merged?

Even though we do use priv and pub keys internally, the pubkey is always getting derived from privkey, but for convenience of configuration I decided to refer to the keys via their SHA1s in configuration files, hence the relevant part that you would have send over to the server admin is 0304d6c606ecfde7d4102237a96b78986a4ab471 string, which again for sake of convenience, is embedded in the file name.

On some older key I have:

$ sha1sum ~/.config/OpenRCT2/keys/some-key-c8e405e9cf483b3341a830a195f7bf0f866d4dbe.pubkey
c8e405e9cf483b3341a830a195f7bf0f866d4dbe  /home/janisozaur/.config/OpenRCT2/keys/some-key-c8e405e9cf483b3341a830a195f7bf0f866d4dbe.pubkey
$ cat ~/.config/OpenRCT2/keys/some-key-c8e405e9cf483b3341a830a195f7bf0f866d4dbe.pubkey
-----BEGIN RSA PUBLIC KEY-----
MIGJAoGBALXEsnI/Xz9OnbOMuhiemjDoWV5LBIgeho2nlCO4vvy/oQtxX7Eb9AfS
KANH0xN9+Bgq0DKAeT3BIJcRIKzKZSHcNBZDOGmK6WXjyQ9fXvW8T//SRT60jkDM
ZG3dWercUdh2qWCy7Mt5pv8ljzRj4vJud33RrOcT0w4CW0iGyj4zAgMBAAE=
-----END RSA PUBLIC KEY-----
$ base64 ~/.config/OpenRCT2/keys/some-key-c8e405e9cf483b3341a830a195f7bf0f866d4dbe.pubkey
LS0tLS1CRUdJTiBSU0EgUFVCTElDIEtFWS0tLS0tCk1JR0pBb0dCQUxYRXNuSS9YejlPbmJPTXVo
aWVtakRvV1Y1TEJJZ2VobzJubENPNHZ2eS9vUXR4WDdFYjlBZlMKS0FOSDB4TjkrQmdxMERLQWVU
M0JJSmNSSUt6S1pTSGNOQlpET0dtSzZXWGp5UTlmWHZXOFQvL1NSVDYwamtETQpaRzNkV2VyY1Vk
aDJxV0N5N010NXB2OGxqelJqNHZKdWQzM1JyT2NUMHc0Q1cwaUd5ajR6QWdNQkFBRT0KLS0tLS1F
TkQgUlNBIFBVQkxJQyBLRVktLS0tLQo=

Please note that you should not use the key you posted private part to anywhere and if you have, revoke it immediately.

@ghost
Copy link
Author

ghost commented Jul 18, 2018

Please note that you should not use the key you posted private part to anywhere and if you have, revoke it immediately.

Right, that did occur to me. Running some tests, will report back.

@ghost
Copy link
Author

ghost commented Jul 18, 2018

Doesn't occur on v0.1.2. Maybe someone else can run a more accurate regression, I don't have an environment set up to build.

@janisozaur
Copy link
Member

-rw-r--r-- 1 janisozaur janisozaur  887 07-18 22:36 janisozaur-test-3b8c0703f-6b12019b2ba6567eae17517c15e3dee23d0221e4.pubkey
-rw-r--r-- 1 janisozaur janisozaur  887 07-18 22:36 janisozaur-test-3b8c0703f.privkey
-rw-r--r-- 1 janisozaur janisozaur  251 07-18 22:38 janisozaur-test-7aada25ed-0d658bd67b0196cc4cf31ce9cc9554a98edcb844.pubkey
-rw-r--r-- 1 janisozaur janisozaur  891 07-18 22:38 janisozaur-test-7aada25ed.privkey

Happens in 3b8c070, doesn't happen in 7aada25, thus regression from #7609.

@janisozaur janisozaur added bug Something went wrong. multiplayer Related to the multiplayer functionality of OpenRCT2. regression An issue that was made since the last release. labels Jul 18, 2018
@janisozaur janisozaur added this to the v0.2.1 milestone Jul 18, 2018
janisozaur added a commit to janisozaur/OpenRCT2 that referenced this issue Jul 18, 2018
janisozaur added a commit to janisozaur/OpenRCT2 that referenced this issue Jul 18, 2018
janisozaur added a commit to janisozaur/OpenRCT2 that referenced this issue Jul 23, 2018
janisozaur added a commit that referenced this issue Aug 26, 2018
- Feature: [#5993] Ride window prices can now be set via text input.
- Feature: [#6998] Guests now wait for passing vehicles before crossing railway tracks.
- Feature: [#7658] Add option to always use system file browsing window.
- Feature: [#7694] Debug option to visualize paths that the game detects as wide.
- Feature: [#7713] The virtual floor now takes land ownership rights into account.
- Feature: [#7771] Danish translation.
- Feature: [#7797, #7802, #7821, #7830] Add sprite font glyphs for Danish, Norwegian, Russian, Turkish, Catalan and Romanian.
- Feature: [#7848] Add a master volume slider to audio options screen.
- Feature: [#7868] Placing scenery while holding shift now scales appropriately with zoom levels.
- Feature: [#7882] Auto-detect Steam and GOG installations of RCT1.
- Feature: [#7885] Turkish translation.
- Fix: [#3177] Wrong keys displayed in shortcut menu.
- Fix: [#4039] No sprite font glyph for German opening quotation mark.
- Fix: [#5548] platform_get_locale_date_format is not implemented for Linux.
- Fix: [#7204] Object source filters do not work for RCT1, AA and LL.
- Fix: [#7440] Memory leak. All system memory used.
- Fix: [#7462] Guest window goes beyond the map edge on a spiral slide.
- Fix: [#7533] Screenshot is incorrectly named/file is not generated in CJK language.
- Fix: [#7628] Always-researched items can be modified in the inventory list.
- Fix: [#7643] No Money scenarios with funding set to zero.
- Fix: [#7653] Finances money spinner is too narrow for big loans.
- Fix: [#7673] Vehicle names are cut off in invention list.
- Fix: [#7674] Rides show up as random numbers in guest's ride list.
- Fix: [#7678] Crash when loading or starting a new game while having object selection window open.
- Fix: [#7683] 'Arbitrary ride type' dropdown state is shared between windows.
- Fix: [#7697] Some scenery groups in RCT1 saves are never invented.
- Fix: [#7711] Inverted Hairpin Coaster allows building invisible banked pieces.
- Fix: [#7734] Title sequence not included in macOS builds as of 0.2.0 release.
- Fix: [#7756] Steam RCT2 path not correctly checked on macOS and Linux.
- Fix: [#7765] Crash when opening ride list window on Windows Vista.
- Fix: [#7773] Once research has been completed, player is still charged for research.
- Fix: [#7786] Crash when importing a track design.
- Fix: [#7793] Duplicate private keys generated.
- Fix: [#7817] No sprite font glyph for interpunct.
- Fix: [#7823] You can build mazes in pause mode.
- Fix: [#7804] Russian ride descriptions are cut off.
- Fix: [#7872] CJK tooltips are often cut off.
- Fix: [#7895] Import of Mega Park and the RCT1 title music do not work on some RCT1 sources.
- Improved: [#7899] Timestamps in the load/save screen are now displayed using local timezone instead of GMT.
- Improved: [#7918] Better RCT2 detection if both disc and GOG/Steam versions are installed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something went wrong. multiplayer Related to the multiplayer functionality of OpenRCT2. regression An issue that was made since the last release.
Projects
None yet
Development

No branches or pull requests

1 participant