Starting the Hyperledger Indy test pool reachable on your WIFI network

Hyperledger Indy's explains how to start the @Sovrin test pool on localhost using docker and in a docker network.

Doing it this way the pool is not reachable from clients that are not on your local machine.
Building a mobile app then has the problem that the phone can't talk to the test pool because neither localhost nor the private docker network are reachable.

Starting the test pool on a specific IP address

Dockerfile ci/indy-pool.dockerfile supports an optional pool_ip param that allows changing the IP address of the pool nodes in the generated pool configuration.

You can start the pool with e.g. the IP address of your development machine's WIFI interface so that mobile apps in the same network can reach the pool.

# replace with your wifi IP address
docker build --build-arg pool_ip= -f ci/indy-pool.dockerfile -t
Continue reading "Starting the Hyperledger Indy test pool reachable on your WIFI network"

Building an Android App with Sovrin

Thanks to the hard work of Mohammad Abdul Sami Sovrin enthusiasts now have support building libindy for Android in the master branch of our repo.

You can now build the libindy libraries for Android by just running a script. Yeah!
If you want to spare that building process you can download the libraries from Evernym. Thanks!

Now what? You have a for arm, arm64 and x86, but how do you use it?

I have created an Android Studio sample application DroidLibIndy that you might use as a starting point (if you don't like reading blog posts).

Still reading? Here is a list of quirks you need in your flashy new Indy-App.

  1. First you have to put the libindy library into the correct jni folder e.g.:
    This other way to do this did not work for me.
  2. Source code and Target compatibility have to be Java
    Continue reading "Building an Android App with Sovrin"

Building openssl for libindy and Android

Building of the indy-sdk for Android is currently not supported out of the box. The underlying issue is that libindy is implemented in Rust and the Android platform is currently not supported.

To build openssl for Android on your Ubuntu system take the following steps:
  1. Setup your build environment - missing tools are likely to be noticed by "configure" so you can install them then 
  2. Download openssl (I used version 1.0.2n) and unpack it.
  3. Setup the Android toolchain (command line tools are enough) and NDK toolchain for e.g. arm
    ${NDK_HOME}/build/tools/  --api 14 --arch arm  --install-dir ${NDK_TOOLCHAIN_DIR}/arm --stl=libc++
    or for arm64
    ${NDK_HOME}/build/tools/  --api 21 --arch arm64  --install-dir ${NDK_TOOLCHAIN_DIR}/arm64 --stl=libc++
  4. Edit the script

    I have these values:
  5. Run the script '.'
  6. run this:
    ./config shared no-ssl2 no-ssl3 no-comp no-hw no-engine      --openssldir=/usr/local/ssl/arm/$ANDROID_API --prefix=/usr/local/ssl/arm/$ANDROID_API
  7. Edit Makefile and add
    Continue reading "Building openssl for libindy and Android"

Minimize Ladder Length over Wall

Some time ago somebody had to solve this math optimization question for their studies and told me about it.

So there is a wall with height h, which has the distance a from a very high "building" and your task, should you accept it, is to find the shortest ladder over the wall that touches the ground and the "building".

So the function to minimize is L = sqrt((x+a)^2+(h+y)^2).
Because we know that y/a = h/x it follows that y = ah/x.
Using this the length become L = sqrt((x+a)^2+(h+ah/x)^2)
The minimum of that function is not changed if we leave out the sqrt and the derivation of (x+a)^2+(h+ah/x)^2 is (2 (a + x) (-a h^2 + x^3))/x^3
So the minimum x is where this function equals zero, which is if x³ = ah²,
and the length then is L = (a^(2/3) + h^(2/3))^3
Now the thing that I
Continue reading "Minimize Ladder Length over Wall"

Minimize Ladder Length over Wall

Some time ago somebody had to solve this math optimization question for their studies and told me about it.

So there is a wall with height h, which has the distance a from a very high "building" and your task, should you accept it, is to find the shortest ladder over the wall that touches the ground and the "building".

So the function to minimize is L = sqrt((x+a)^2+(h+y)^2).
Because we know that y/a = h/x it follows that y = ah/x.
Using this the length become L = sqrt((x+a)^2+(h+ah/x)^2)
The minimum of that function is not changed if we leave out the sqrt and the derivation of (x+a)^2+(h+ah/x)^2 is (2 (a + x) (-a h^2 + x^3))/x^3
So the minimum x is where this function equals zero, which is if x³ = ah²,
and the length then is L = (a^(2/3) + h^(2/3))^3
Now the thing that I
Continue reading "Minimize Ladder Length over Wall"

CSS Oddities: anonymous inline whitespace nodes

I learned something today. All started with a @Twitter post by @supersole that there is a new feature in @firefoxnighly that now allows debugging "anonymous inline whitespace" nodes in HTML pages.

The post claims that imgimg on the page is rendered differently than imgcrlfwhitespacecrlfimg.
I could not believe this. That is stupid right? Which web developer would expect any difference?

Well, it seems that CSS rules - being what they currently are - lead to this unexpected difference.
The CSS spec describes the algorithm to process the HTML here in Phase I: Collapsing and Transformation.
In the second HTML fragment the whitespace is deleted by step 2 which gives us 
Step 2 tells us to handle segment breaks ("crlf"). That is described in the Segment Break Transformation Rules.
Those rule give us imgspacespaceimg. Which is then again continued to be processed by
Continue reading "CSS Oddities: anonymous inline whitespace nodes"

Twitter Markup

Twitter Cards are around for some time now and I recently wondered how commonly used they are?

There is a nice blog post on Blogger on how to integrate them there but clearly there should be ways for e.g. newspapers to promote their reports by providing summaries and a main image and author information that is not @Twitter specific?  Microformats and to the rescue?

What does Google do? It seems that JSON-LD is the recommended format.

How would a Twitter Card look in JSON-LD?

Twitter Cards or Rich Cards or @w3c Cards?

Time to standardize!

New Firefox Add-On: QRCode Login

Current login mechanisms suffer from missing support by browsers and sites.
Browsers offer in-browser password storage but that's about that.
Standardized authentication methods like HTTP Digest Authentication and HTTP Basic Authentication were never really accepted by commercially successful sites. They work but the user experience is bad especially if the user does not have an account yet.

So most sites are left with form-based authentication were the site has full control over the UI and UX. Sadly the browser has little to offer here to help the site or the user other then trying to identify signup and login forms through crude guesses based on password field existence.

There is no standardized way for sites and browsers to work together.
Here is a list of attempts to solve some of the above issues:
Federations have their drawbacks too. Even Facebook login went dark for 4h a while ago which left sites depending on Facebook without user login.

In general there is this chicken-egg problem:
Why should sites support new-mechanism-foo when there is no browser support.
Why should browsers support new-mechanism-foo when there are no sites using it.

Then there are password stores. I use passwordsafe to store my password in one place. If I do not have access to that place (PC) then I can't login. Bummer.
Others use stores hosted on the Internet and those usually support most browsers and OSses through plugin/addons and non standard trickery.
I never could convince myself to trust the providers.

So. Drum-roll.
I started to work on a mechanism that has a password store on the mobile which allows you to login on your PC using your PC's camera.

The user story is as follows:
  1. browse to a site's login page e.g.
  2. have my Firefox addon installed
  3. click on the addon's icon
  4. present your credential-qrcode to the PC's camera
  5. be logged in
Here is an example qrcode containing the credentials as a JSON array

    The qrcode could be printed on paper or generated by your password store on your mobile. To help the user with the selection of the matching credentials the addon presents a request-qrcode to be read by the mobile first. This way the mobile ID-client can select the matching credentials.
    (If you don't like to install addons to test this and for a super quick demo of the qrcode reading using your webcam please to to and scan a code)

    What are the benefits?

    x-auto-login at Mozilla Services?

    As I described here

    Google is using a proprietary HTTP header named x-auto-login to log you into Google services like GMail using your local Android account.
    This is cool.

    Browse to a Google website and be logged in without the need to remember the super secure password. Sadly this is a closed system as we learned when implementing this for Firefox for Android (Fennec).

    Yes, Fennec can talk to the Authenticator and ask for a "weblogin:" token for "" but the Authenticator answers differently depending on who asks. If Chrome is asking then the returned token redirects you to and immediately logs you in, but when you'r Fennec then you are just redirected to and have to enter username and password. Bummer.

    Anyway: How about using this scheme for Mozilla services and using a Mozilla account on the device or local to the browser (Firefox Sync) if available.
    Continue reading "x-auto-login at Mozilla Services?"

    X-Auto-Login at Google

    Below you can find evidence that Google is using the X-Auto-Login header in production.
    Please see my other post for context:
     I am using "wget" to get gmail web page and the HTTP response contains the X-Auto-Login header.

    I think that Google should standardize this.
    Currently Google is using OpenID2 here but it is probably ease to standardize this with OpenID Connect.

    ignisvulpis@namenlos:~/mozilla-central$ wget -S --user-agent="Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2049.0 Safari/537.36"
    --2014-11-03 12:23:50--
    Connecting to connected.
    Proxy request sent, awaiting response...
    HTTP/1.1 302 Moved Temporarily
    Content-Type: text/html; charset=UTF-8
    Cache-Control: no-cache, no-store, max-age=0, must-revalidate
    Pragma: no-cache
    Expires: Fri, 01 Jan 1990 00:00:00 GMT
    Date: Mon, 03 Nov 2014 11:23:51 GMT
    X-Content-Type-Options: nosniff
    X-Frame-Options: SAMEORIGIN
    X-XSS-Protection: 1;
    Continue reading "X-Auto-Login at Google"


    Maybe you are an Android user and wondered how sometimes the browser logs you in without asking for a password?

    Well, I wondered but never found the time to investigate.

    Thanks to the awesome W3C Web Cryptography Next Steps Workshop and thanks to the usual jet-lag I found that time now. First I thought that this is Google-ism "Chrome does some questionable proprietary trick and knows just how to login to Google accounts". That is half-true.

    There is chatter on the chromium list but I seems that the Android browser knows this trick since 2011 and Chrome for Android was released in 2012.

    So how does it work?
    1. a site responds with a special HTTP header "X-Auto-Login" 
    2. the browser sees that header 
    3. the browser asks the device's account system for local accounts for the realm parameter of the header (e.g. 
    4. the browser asks for a special kind
      Continue reading "DeviceAutoLogin"

    Web Identity Restart?

    Well, how can you restart something that never started? ... Never mind.

    I am wondering whether it makes sense to have a W3C workshop on "Internet Identity" again.

    My impression in 2011 was that the common ground was not very broad so the group decided to launch the W3C WebCrypto working group because all agreed that crypto is a precondition to web identity. Now, three years later I do not see much progress in web crypto or web identity (for that matter).

    In the meantime the FIDO alliance was established which has HW-based authentication but a license model that requires that implementers are a FIDO alliance member. That is the opposite of a web standard.

    So I think that the WebCrypto WG will not give us "identity for the web". Signing/verification/encryption/decryption are too low level and too easy to use wrong. This is not the way to web
    Continue reading "Web Identity Restart?"

    ACM Digital Identity Management

    The call for papers to ACM Digital Identity Management is open

    "Identity at the Crossroads"

    This workshop will explore crucial issues concerning interoperable identity management technologies for the information society.
    Identity management has seen a series of development in the recent years. Whereas identity management and federation standards have been solidified and adopted in practice, nations world-wide are investing in electronic identity systems as strong root identities for their citizens offering a promise for strong authentication. Privacy-enhancing identity systems have reached some technical maturity and may offer user authentication with minimal disclosure. At the same time, personal identifiable information and the user's identity has become a commodity to drive the business of global corporations. Whereas such companies sought to bind the users accounts to their unique identity, there has been a reported unrest and anxiety of users because of their diminishing privacy protection.
    We see identity
    Continue reading "ACM Digital Identity Management"

    HTTPS EveryWhere Kantara Initiative

    I noticed that when I am logged into and I then access documents
    on there is no SSL protection. This is probably not good.

    HTTPS Everywhere to the rescue!
    HTTPS Everywhere Logo

    I added my own rule to the HTTPS Everywhere Firefox addon. (Works in Firefox 21.0)

    <ruleset name="KantaraInitiative">
     <target host="" />
     <target host="" />
     <target host="" />

     <rule from="^" to=""/>
     <rule from="^http://(www.)?" to=""/>

    Put the above ruleset into the Firefox Profile folder into a file named e.g. kantarainitiative.xml.
    On Windows it should be located in a folder similar to this location:
    Now whenever I visit Kantara HTTPSEverywhere redirects Firefox to the SSL protected service.

    Support EFF!

    Android SSO

    The documentation of Android's AccountManager is infamously uninformative. AccountManager is available since API level 5 and I got the impression that Google changed it a lot. I am not sure whether it is still work-in-progress. Probably.

    So how does Google do SSO for their own services? Not long ago Google introduced Google Play Services

    Google Play Services contains an Authenticator that handles all Accounts for "". The Google apps like GMail etc query this Authenticator for access tokens using the Authenticators getAuthToken method. The application can then use this access token to access the API of its backend server.

    How can this be secure? How does the Google Play Services SDK (GoogleAuthUtil) know that GMail is a trusted app?
    I am guessing here but I think that Google uses the same mechanism that Google recommends for developers. The keys used to sign an Android app are retrievable by the
    Continue reading "Android SSO"

    Google: Standardizing Payments on the Web: Introducing requestAutocomplete()

    Google is taking huge steps to simplify payments. Which is great!

    If you have about 25 minutes then watch this presentation.

    The major takeaways:
    • Sites should use standardized names for form input field's autocomplete attributes.
      <input id="nme" name="username" autocomplete="full-name">
      id and name stay as they are but site owner should use standard values for autocomplete.
    • The browser presents the user with a dialog that allows to choose between different sets of data; e.g. change to different shipping address.
    • On Chrome there is tight integration with Google Wallet and instead of your real credit card information a one time credit card is issued by the Google Wallet backend.
      Caveat: Google Wallet currently is US only!

    Google Wallet is only one data source for autocomplete. If Google Wallet is not available then Chrome's local autofill  data is used for autocomplete.

    Google said that they talked to other browser vendors but
    Continue reading "Google: Standardizing Payments on the Web: Introducing requestAutocomplete()"

    Google Wallet Objects

    During Google I/O there were several presentations about Google Wallet Objects.

    Although the documentation is not public one can get a few ideas what those objects are.

    What I find interesting is that we at T-Labs named the "things" inside our wallet "objects" too.

    Well, at first we just called them "cards" and the wallet is a card selector. The cards can be anything: payment cards, train tickets, loyalty cards, car keys, coupons. Everything that is in your wallet.

    Others called the "things" in the wallet "service". Some defined them just to be links to app on the same device as the wallet. Some defined them as meta data, that describes the service, the issuer, the service endpoints, the protocols needed to get tokens from the endpoints and so forth. Some objects contain code that is executed by the wallet.

    Our T-Labs wallet objects are currently called "items" and they
    Continue reading "Google Wallet Objects"

    FIDO Alliance

    I am not happy with the FIDO Alliance and their FAQ do not eliminate my concerns.

    The major concern beeing: "Why isn't this going straight to a standards body?"
    Their answer:
    The FIDO authentication protocol needs to be part of a standardized, interoperable ecosystem to be successful. Building this ecosystem requires the active commitment of everybody from hardware chipset vendors, to the manufacturers of back-end server systems. Coordination across the divergent interests of these players is a complex affair, and one that current technical standards bodies are not well suited to handle.
    The FIDO Alliance will refine the protocol, and monitor the extensions required to meet market needs and to make the protocol robust and mature. Implementation will not be undertaken by the FIDO Alliance. The mature protocol will be presented to the IETF, W3C or similar body after which it will be open to all industry players to
    Continue reading "FIDO Alliance"

    Javascript API for OpenID

    Too long ago I wrote about an Javascript API for openid: all those NASCARs

    To repeat the main points:

    Sites currently have no easy way to detect support for openidThe site can detect support for openid like so:

    if (window.openid) { don't show the nascar }

    The DOM level API that allows the site to query the preferred identity provider looks like this:

    In a world of oauth2 and openid connect this could be generalized to:

    var parameters = {};
    parameters.request = "eyJhbGciOiJSUzI1NiIsIng1dSI6Imh0dHBzOlwvXC9nYWJ1bm9taS5uZXRcL3NlbWluYXJcL3JzYV9wdWJsaWNfa2V5LnBlbSJ9.ewoJInJlc3BvbnNlX3R5cGUiOiAiaWRfdG9rZW4iLAoJInNjb3BlIjogIm9wZW5pZCIsCgkiY2xpZW50X2lkIjogImh0dHBzOi8vZ2FidW5vbWkubmV0L3NlbWluYXIvY2FsbGJhY2suaHRtbCIsCgkicG9saWN5X3VybCI6ICJodHRwczovL2dhYnVub21pLm5ldC9zZW1pbmFyL3BvbGljeS5odG1sIiwKCSJ1c2VyaW5mbyI6IHsKCQkiY2xhaW1zIjogewoJCQkibmFtZSI6IG51bGwsCgkJCSJlbWFpbCI6IG51bGwsCgkJCSJwaWN0dXJlIjogbnVsbAoJCX0KCX0sCgkicmVnaXN0cmF0aW9uIjogewoJCSJhcHBsaWNhdGlvbl9uYW1lIjogIlNhbXBsZSBTZW1pbmFyIiwKCQkibG9nb191cmwiOiAiaHR0cHM6Ly9nYWJ1bm9taS5uZXQvc2VtaW5hci9sb2dvLnBuZyIsCgkJIng1MDlfdXJsIjogImh0dHBzOi8vZ2FidW5vbWkubmV0L3NlbWluYXIvcnNhX3B1YmxpY19rZXkucGVtIgoJfQp9Cg.Faytuhwb2W4CWVz2-10umSieh-bqR7QXqU0bNF39u_D0mGoBD4e3X2b4jZNqPvPADSnQhlBGSJu189iFM5bwFzchnO-quCpj7T2CK_-wkrpL5LUn_WHYMmYlFadmb-a1p-TEo7exU9azMS9cT70-kHNqmTaJziZyiAMoJ0Q4TtyTt1Xbkknc_CQRug3ilNv3bEXSlOlva3HUOY7jQIbYMB3jDL3QxS1wbVYNAjOxCxCDmiNAUJA-BkYe6Tpyj-DUs57IM4wQSp64sqim8RqirJJfFb4bCbNTkC3G8sYfN2_1-qEDpOnWW7N3gjl174TWHbnzVLAZGg_rZm58-wHOLw";

    window.openid.connect(parameters, oc_callback);
    The callback
    would be called with one parameter.

    function oc_callback(resp) {
    // resp contains a signed then encrypted id_token in jw-* format
    // state and nonce are inside the resp parameter too
    Continue reading "Javascript API for OpenID"