Opened on 09/22/2016 at 06:04:16 PM

Closed on 09/25/2016 at 01:28:01 PM

#4465 closed change (fixed)

Move rsa.js into adblockpluscore

Reported by: kzar Assignee: kzar
Priority: P3 Milestone:
Module: Core Keywords:
Cc: trev, sebastian, greiner Blocked By: #4467
Blocking: #4223, #4466 Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by trev)


For the $sitekey option we need to be able to verify RSA signatures are correct. We have a library for this in the adblockpluschrome repository called rsa.js. We now need to use it from adblockpluscore too in order to continue migrating our tests from adblockplustests.

What to change

  • Copy adblockpluschrome/lib/rsa.js to adblockpluscore/lib/rsa.js.
  • Add adblockpluscore/lib/jsbn.js (current version from that is a proper module).
  • Add adblockpluscore/lib/rusha.js from (can be used as a module and should be faster than sha1.js we use right now).
  • Instead of dumping verifySignature into the global state turn rsa.js into a proper module using exports. Import BigInteger and SHA-1 implementation from modules instead of expecting global variables.
  • Adapt adblockpluschrome/qunit/tests/signatures.js unit test in order to run with nodeunit.

Attachments (0)

Change History (10)

comment:1 Changed on 09/22/2016 at 06:09:41 PM by kzar

  • Blocking 4466 added

comment:2 Changed on 09/22/2016 at 06:43:22 PM by greiner

  • Cc greiner added

comment:3 Changed on 09/23/2016 at 09:39:12 AM by trev

  • Description modified (diff)

Not sure you realized but rsa.js depends on jsbn.js and sha1.js. I modified description to show what we can do with these dependencies.

comment:4 Changed on 09/23/2016 at 09:51:56 AM by trev

  • Description modified (diff)

comment:5 Changed on 09/23/2016 at 09:53:04 AM by trev

  • Description modified (diff)

comment:6 Changed on 09/23/2016 at 09:53:21 AM by trev

  • Priority changed from Unknown to P3
  • Ready set

comment:7 Changed on 09/23/2016 at 10:08:19 AM by kzar

  • Blocked By 4467 added

comment:8 Changed on 09/23/2016 at 12:30:00 PM by kzar

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:9 Changed on 09/25/2016 at 01:27:11 PM by abpbot

A commit referencing this issue has landed:
Issue 4465 - Move rsa module from adblockpluschrome

comment:10 Changed on 09/25/2016 at 01:28:01 PM by kzar

  • Resolution set to fixed
  • Status changed from reviewing to closed

Add Comment

Modify Ticket

Change Properties
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from kzar.
Note: See TracTickets for help on using tickets.