acioemu: add support for 1.7.0 and encrypted polls - [merged] #135

Closed
opened 2020-06-14 07:55:58 +03:00 by icex2 · 31 comments
icex2 commented 2020-06-14 07:55:58 +03:00 (Migrated from github.com)

In GitLab by @xyen on Jun 14, 2020, 06:55

Merges icca_170 -> master

Summary

Adds ICCA 1.7.0 ish support, along with encrypted polling

Description

Certain games such as popn? and IIDX require encrypted polling when the card reader is version 1.7.0 in order for the card reader to work

How Has This Been Tested?

Tested booting up IIDX, and verified that key exchange occurs, and card polling works via the encrypted polling method

In GitLab by @xyen on Jun 14, 2020, 06:55 _Merges icca_170 -> master_ ## Summary Adds ICCA 1.7.0 ish support, along with encrypted polling ## Description Certain games such as popn? and IIDX require encrypted polling when the card reader is version 1.7.0 in order for the card reader to work ## How Has This Been Tested? Tested booting up IIDX, and verified that key exchange occurs, and card polling works via the encrypted polling method
icex2 commented 2020-06-14 12:42:48 +03:00 (Migrated from github.com)

Do you know how the game checks this version? I would assume it just checks and does something along the lines if (current_version < reader_version) updateReaders();. I was thinking about rather old games like iidx 13 which introduced these types of readers and if the default version there is fine.

Do you know how the game checks this version? I would assume it just checks and does something along the lines `if (current_version < reader_version) updateReaders();`. I was thinking about rather old games like iidx 13 which introduced these types of readers and if the default version there is fine.
icex2 commented 2020-06-14 12:44:09 +03:00 (Migrated from github.com)

Nit: Line break before (and after) control blocks.

Nit: Line break before (and after) control blocks.
icex2 commented 2020-06-14 12:56:12 +03:00 (Migrated from github.com)

Why is this removed?

Why is this removed?
icex2 commented 2020-06-14 12:57:23 +03:00 (Migrated from github.com)

Since this defaults, I would add a comment here that this is an optional call on initialization.

Since this defaults, I would add a comment here that this is an optional call on initialization.
icex2 commented 2020-06-14 13:01:27 +03:00 (Migrated from github.com)

How crucial is it leaving this a constant? Otherwise, I suggest add a new function crypto_gen_random32 to the crypto module and use it here.

How crucial is it leaving this a constant? Otherwise, I suggest add a new function `crypto_gen_random32` to the `crypto` module and use it here.
icex2 commented 2020-06-14 13:03:44 +03:00 (Migrated from github.com)

In GitLab by @xyen on Jun 14, 2020, 12:03

Commented on src/main/acioemu/icca.c line 72

It depends per game, I set it to 1.6.0, since that's what we were previously emulating, I added 1.5.0 as an option, since later on we want to merge in the ICCB code probably (for jubeat) which is currently pretending to be 1.5.0.

In GitLab by @xyen on Jun 14, 2020, 12:03 Commented on [src/main/acioemu/icca.c line 72](https://github.com/djhackersdev/bemanitools/compare/1656feccd1c3b67c49480588de657e604a339753..8eaeac7f2c33f211901c213260678beff7752b81#diff-affab87058fe7f10f8cdc694a83c62e0R72) It depends per game, I set it to 1.6.0, since that's what we were previously emulating, I added 1.5.0 as an option, since later on we want to merge in the ICCB code probably (for jubeat) which is currently pretending to be 1.5.0.
icex2 commented 2020-06-14 13:03:57 +03:00 (Migrated from github.com)

In GitLab by @xyen on Jun 14, 2020, 12:03

Commented on src/main/util/crc.c line 65

Copied from the above code.

In GitLab by @xyen on Jun 14, 2020, 12:03 Commented on [src/main/util/crc.c line 65](https://github.com/djhackersdev/bemanitools/compare/2b95e25e0e5ad1bc20eae21302ebd363ba5ce98b..5dd5266b9d6a2f77aa35237df2972e756df835c3#diff-aba04262f5cf3155ff0e83c5d1b06743R65) Copied from the above code.
icex2 commented 2020-06-14 13:04:42 +03:00 (Migrated from github.com)

I don't think you can answer this, but is there a newer version than v170 that also uses encryption? I have a feeling this should be icca->version >= v170. If you don't know that (yet), I would leave a comment, something like: v170 is the latest known version but this might be used with future versions as well.

I don't think you can answer this, but is there a newer version than v170 that also uses encryption? I have a feeling this should be `icca->version >= v170`. If you don't know that (yet), I would leave a comment, something like: `v170 is the latest known version but this might be used with future versions as well`.
icex2 commented 2020-06-14 13:05:22 +03:00 (Migrated from github.com)

Magic number 18. This looks like it can be derived from some stucture using sizeof?

Magic number 18. This looks like it can be derived from some stucture using `sizeof`?
icex2 commented 2020-06-14 13:05:58 +03:00 (Migrated from github.com)

Magic number 16, same question as above.

Magic number 16, same question as above.
icex2 commented 2020-06-14 13:06:47 +03:00 (Migrated from github.com)

Magic number.

Magic number.
icex2 commented 2020-06-14 13:09:20 +03:00 (Migrated from github.com)

Since I don't see a reason to allow ptr being NULL for both functions, I suggest we include this assert because it catches such programming mistakes and logs it instead of the application just crashing.

Since I don't see a reason to allow `ptr` being NULL for both functions, I suggest we include this assert because it catches such programming mistakes and logs it instead of the application just crashing.
icex2 commented 2020-06-14 14:56:02 +03:00 (Migrated from github.com)

In GitLab by @xyen on Jun 14, 2020, 13:56

Commented on src/main/acioemu/icca.c line 371

icca->version is an enum, not a version number technically.

Also 1.6.0 also supports encryption, the 1.7.0 changes are unrelated technically to the encryption support.

In GitLab by @xyen on Jun 14, 2020, 13:56 Commented on [src/main/acioemu/icca.c line 371](https://github.com/djhackersdev/bemanitools/compare/1656feccd1c3b67c49480588de657e604a339753..8eaeac7f2c33f211901c213260678beff7752b81#diff-affab87058fe7f10f8cdc694a83c62e0R371) `icca->version` is an enum, not a version number technically. Also 1.6.0 also supports encryption, the 1.7.0 changes are unrelated technically to the encryption support.
icex2 commented 2020-06-14 15:01:00 +03:00 (Migrated from github.com)

In GitLab by @xyen on Jun 14, 2020, 14:01

Commented on src/main/acioemu/icca.c line 439

changed this line in version 2 of the diff

In GitLab by @xyen on Jun 14, 2020, 14:01 Commented on [src/main/acioemu/icca.c line 439](https://github.com/djhackersdev/bemanitools/compare/2b95e25e0e5ad1bc20eae21302ebd363ba5ce98b..c934d652e1fd8f20429f184289ae7985783d613d#diff-affab87058fe7f10f8cdc694a83c62e0R439) changed this line in [version 2 of the diff](/djhackers/bemanitools/-/merge_requests/34/diffs?diff_id=1235&start_sha=c934d652e1fd8f20429f184289ae7985783d613d#afe0e349cab0b6e39bf4435fdcb044da5be5b82e_439_436)
icex2 commented 2020-06-14 15:01:00 +03:00 (Migrated from github.com)

In GitLab by @xyen on Jun 14, 2020, 14:01

Commented on src/main/acioemu/icca.c line 443

changed this line in version 2 of the diff

In GitLab by @xyen on Jun 14, 2020, 14:01 Commented on [src/main/acioemu/icca.c line 443](https://github.com/djhackersdev/bemanitools/compare/2b95e25e0e5ad1bc20eae21302ebd363ba5ce98b..c934d652e1fd8f20429f184289ae7985783d613d#diff-affab87058fe7f10f8cdc694a83c62e0R443) changed this line in [version 2 of the diff](/djhackers/bemanitools/-/merge_requests/34/diffs?diff_id=1235&start_sha=c934d652e1fd8f20429f184289ae7985783d613d#afe0e349cab0b6e39bf4435fdcb044da5be5b82e_443_442)
icex2 commented 2020-06-14 15:01:00 +03:00 (Migrated from github.com)

In GitLab by @xyen on Jun 14, 2020, 14:01

Commented on src/main/acioemu/icca.c line 493

changed this line in version 2 of the diff

In GitLab by @xyen on Jun 14, 2020, 14:01 Commented on [src/main/acioemu/icca.c line 493](https://github.com/djhackersdev/bemanitools/compare/2b95e25e0e5ad1bc20eae21302ebd363ba5ce98b..c934d652e1fd8f20429f184289ae7985783d613d#diff-affab87058fe7f10f8cdc694a83c62e0R493) changed this line in [version 2 of the diff](/djhackers/bemanitools/-/merge_requests/34/diffs?diff_id=1235&start_sha=c934d652e1fd8f20429f184289ae7985783d613d#afe0e349cab0b6e39bf4435fdcb044da5be5b82e_493_492)
icex2 commented 2020-06-14 15:01:00 +03:00 (Migrated from github.com)

In GitLab by @xyen on Jun 14, 2020, 14:01

added 1 commit

  • 7b3e7b3a - acioemu: add support for 1.7.0 and encrypted polls

Compare with previous version

In GitLab by @xyen on Jun 14, 2020, 14:01 added 1 commit <ul><li>7b3e7b3a - acioemu: add support for 1.7.0 and encrypted polls</li></ul> [Compare with previous version](/djhackers/bemanitools/-/merge_requests/34/diffs?diff_id=1235&start_sha=c934d652e1fd8f20429f184289ae7985783d613d)
icex2 commented 2020-06-14 15:02:17 +03:00 (Migrated from github.com)

In GitLab by @xyen on Jun 14, 2020, 14:02

Commented on src/main/acioemu/icca.c line 504

Realistically speaking, leaving it static is fine, since the host key is randomized anyways.

In GitLab by @xyen on Jun 14, 2020, 14:02 Commented on [src/main/acioemu/icca.c line 504](https://github.com/djhackersdev/bemanitools/compare/2b95e25e0e5ad1bc20eae21302ebd363ba5ce98b..5dd5266b9d6a2f77aa35237df2972e756df835c3#diff-affab87058fe7f10f8cdc694a83c62e0R504) Realistically speaking, leaving it static is fine, since the host key is randomized anyways.
icex2 commented 2020-06-14 15:02:17 +03:00 (Migrated from github.com)

In GitLab by @xyen on Jun 14, 2020, 14:02

resolved all threads

In GitLab by @xyen on Jun 14, 2020, 14:02 resolved all threads
icex2 commented 2020-06-14 17:00:13 +03:00 (Migrated from github.com)

Ok, can you add that note as a comment there replacing the // should probably RNG this?

Ok, can you add that note as a comment there replacing the `// should probably RNG this`?
icex2 commented 2020-06-14 17:01:30 +03:00 (Migrated from github.com)

Instead of "probably should do this", do it, do it!!! ;)
I suggest warning level.

Instead of "probably should do this", do it, do it!!! ;) I suggest warning level.
icex2 commented 2020-06-17 02:00:09 +03:00 (Migrated from github.com)

In GitLab by @xyen on Jun 17, 2020, 01:00

Commented on src/main/acioemu/icca.c line 254

changed this line in version 3 of the diff

In GitLab by @xyen on Jun 17, 2020, 01:00 Commented on [src/main/acioemu/icca.c line 254](https://github.com/djhackersdev/bemanitools/compare/2b95e25e0e5ad1bc20eae21302ebd363ba5ce98b..7b3e7b3a4dc412dbbbc3f78ac04d1a3cb01e3cfa#diff-affab87058fe7f10f8cdc694a83c62e0R254) changed this line in [version 3 of the diff](/djhackers/bemanitools/-/merge_requests/34/diffs?diff_id=1237&start_sha=7b3e7b3a4dc412dbbbc3f78ac04d1a3cb01e3cfa#afe0e349cab0b6e39bf4435fdcb044da5be5b82e_254_254)
icex2 commented 2020-06-17 02:00:09 +03:00 (Migrated from github.com)

In GitLab by @xyen on Jun 17, 2020, 01:00

added 1 commit

  • 5dd5266b - acioemu: add support for 1.7.0 and encrypted polls

Compare with previous version

In GitLab by @xyen on Jun 17, 2020, 01:00 added 1 commit <ul><li>5dd5266b - acioemu: add support for 1.7.0 and encrypted polls</li></ul> [Compare with previous version](/djhackers/bemanitools/-/merge_requests/34/diffs?diff_id=1237&start_sha=7b3e7b3a4dc412dbbbc3f78ac04d1a3cb01e3cfa)
icex2 commented 2020-06-17 02:00:18 +03:00 (Migrated from github.com)

In GitLab by @xyen on Jun 17, 2020, 01:00

resolved all threads

In GitLab by @xyen on Jun 17, 2020, 01:00 resolved all threads
icex2 commented 2020-06-18 00:50:45 +03:00 (Migrated from github.com)

In GitLab by @Felix on Jun 17, 2020, 23:50

Pop'n does not necessarily require 1.7.0 to negotiate, but it does use the key exchange and poll encrypted method on reader firmware 1.5.1.

I have a reader that was pulled from a pop'n cab.

In GitLab by @Felix on Jun 17, 2020, 23:50 Pop'n does not necessarily require 1.7.0 to negotiate, but it does use the key exchange and poll encrypted method on reader firmware 1.5.1. I have a reader that was pulled from a pop'n cab.
icex2 commented 2020-06-25 03:57:51 +03:00 (Migrated from github.com)

In GitLab by @xyen on Jun 25, 2020, 02:57

Commented on src/main/util/crc.c line 65

changed this line in version 4 of the diff

In GitLab by @xyen on Jun 25, 2020, 02:57 Commented on [src/main/util/crc.c line 65](https://github.com/djhackersdev/bemanitools/compare/2b95e25e0e5ad1bc20eae21302ebd363ba5ce98b..5dd5266b9d6a2f77aa35237df2972e756df835c3#diff-aba04262f5cf3155ff0e83c5d1b06743R65) changed this line in [version 4 of the diff](/djhackers/bemanitools/-/merge_requests/34/diffs?diff_id=1240&start_sha=5dd5266b9d6a2f77aa35237df2972e756df835c3#3bde62773116be859790a5393bc6fff47b2607b7_65_65)
icex2 commented 2020-06-25 03:57:52 +03:00 (Migrated from github.com)

In GitLab by @xyen on Jun 25, 2020, 02:57

added 1 commit

  • 0f2e2381 - acioemu: add support for 1.7.0 and encrypted polls

Compare with previous version

In GitLab by @xyen on Jun 25, 2020, 02:57 added 1 commit <ul><li>0f2e2381 - acioemu: add support for 1.7.0 and encrypted polls</li></ul> [Compare with previous version](/djhackers/bemanitools/-/merge_requests/34/diffs?diff_id=1240&start_sha=5dd5266b9d6a2f77aa35237df2972e756df835c3)
icex2 commented 2020-06-25 03:57:52 +03:00 (Migrated from github.com)

In GitLab by @xyen on Jun 25, 2020, 02:57

Commented on src/main/acioemu/icca.c line 504

changed this line in version 4 of the diff

In GitLab by @xyen on Jun 25, 2020, 02:57 Commented on [src/main/acioemu/icca.c line 504](https://github.com/djhackersdev/bemanitools/compare/2b95e25e0e5ad1bc20eae21302ebd363ba5ce98b..5dd5266b9d6a2f77aa35237df2972e756df835c3#diff-affab87058fe7f10f8cdc694a83c62e0R504) changed this line in [version 4 of the diff](/djhackers/bemanitools/-/merge_requests/34/diffs?diff_id=1240&start_sha=5dd5266b9d6a2f77aa35237df2972e756df835c3#afe0e349cab0b6e39bf4435fdcb044da5be5b82e_504_504)
icex2 commented 2020-06-25 03:58:01 +03:00 (Migrated from github.com)

In GitLab by @xyen on Jun 25, 2020, 02:58

added 2 commits

  • 1656fecc - 1 commit from branch master
  • 8eaeac7f - acioemu: add support for 1.7.0 and encrypted polls

Compare with previous version

In GitLab by @xyen on Jun 25, 2020, 02:58 added 2 commits <ul><li>1656fecc - 1 commit from branch <code>master</code></li><li>8eaeac7f - acioemu: add support for 1.7.0 and encrypted polls</li></ul> [Compare with previous version](/djhackers/bemanitools/-/merge_requests/34/diffs?diff_id=1241&start_sha=0f2e2381f2b8218e44191f5fc93d0d31580557be)
icex2 commented 2020-06-25 03:58:53 +03:00 (Migrated from github.com)

In GitLab by @xyen on Jun 25, 2020, 02:58

Addressed prior comments, and got the ok offline.

Also yeah @Felix that's why I didn't tie the key / poll behaviour to version.

In GitLab by @xyen on Jun 25, 2020, 02:58 Addressed prior comments, and got the ok offline. Also yeah @Felix that's why I didn't tie the key / poll behaviour to version.
icex2 commented 2020-06-25 03:58:57 +03:00 (Migrated from github.com)

In GitLab by @xyen on Jun 25, 2020, 02:58

merged

In GitLab by @xyen on Jun 25, 2020, 02:58 merged
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Max/djhackersdev_bemanitools#135