Code Monkey home page Code Monkey logo

Comments (13)

indutny avatar indutny commented on July 20, 2024

Interesting... What IE version is this? May I ask you to post some code-context from unittests-bundle.js:10979?

from elliptic.

evilaliv3 avatar evilaliv3 commented on July 20, 2024

it apply to all the internet explorer versions from 8 to 11 :(

the context is:

  function testFactory(i) {
    it('can compute correct a and A for secret: ' + i, function() {
      var test = derivations[i];
      var secret = utils.toArray(test.secret_hex, 'hex');
      var key = ed25519.keyFromSecret(secret);
      assert.equal(toHex(key.privBytes()), test.a_hex);
      var xRecovered = toHex(ed25519.encodeInt(
                             ed25519.decodePoint(key.pubBytes()).getX()));
      assert.equal(xRecovered, test.A_P.x);
      assert.equal(toHex(key.pubBytes()), test.A_hex);
    });
  }

seems so that the key = ed25519.keyFromSecret(secret); is not returning a correct object containing privBytes method.

from elliptic.

evilaliv3 avatar evilaliv3 commented on July 20, 2024

i think i'm near to the point;

cachedProperty(KeyPair, function pubBytes() {
  return this.eddsa.encodePoint(this.pub());
});

i'm thinking that the cachedProperty is not working on IE; possible?

function cachedProperty(obj, computer) {
  var name = computer.name;
  var key = '_' + name;
  obj.prototype[name] = function cachedProperty() {
    return this[key] !== undefined ? this[key] :
           this[key] = computer.call(this);
  };
}

if this was working in past i think that probably the bug has been inserted in this commit: 49533ee

from elliptic.

indutny avatar indutny commented on July 20, 2024

Probably the .name is empty?

from elliptic.

indutny avatar indutny commented on July 20, 2024

Seems to be non-standard: http://stackoverflow.com/questions/6903762/function-name-not-supported-in-ie

from elliptic.

evilaliv3 avatar evilaliv3 commented on July 20, 2024

bingo!

from elliptic.

indutny avatar indutny commented on July 20, 2024

Fix is coming in a bit.

from elliptic.

indutny avatar indutny commented on July 20, 2024

The regression tests will come with your patch, though 😢

from elliptic.

indutny avatar indutny commented on July 20, 2024

May I ask you to give a try to d3049b8 ?

from elliptic.

indutny avatar indutny commented on July 20, 2024

Thanks!

from elliptic.

evilaliv3 avatar evilaliv3 commented on July 20, 2024

K! going to rebase my patch on current master, this way recommitting i will test it in the cloud!

from elliptic.

evilaliv3 avatar evilaliv3 commented on July 20, 2024

verified that tha this bug is solved! thanks to you!

from elliptic.

indutny avatar indutny commented on July 20, 2024

no problem!

from elliptic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.