Tuesday, August 18, 2015

Mixed expereinces of my first hackathon last year: How AT&T can legally steal your idea and own it

I wanted to share my unexpected and mixed experiences from my hackathon last year.
 http://www.eventbrite.com/e/att-mobile-app-hackathon-dallas-connected-car-tickets-12156796305

I attend that hackathon in aug 2015..pitched an idea for connected car theme "how about smart cars save babies in locked in carseat when parents are away from the carseat?"  we called it "childcheck" and talked about sensors detecting temperature rise and visual monitoring of the car and sending voivemails/pusnotifications/alerts to car owners( parents)
 and in 2015 a year later
At&t comes up with the same idea :)
http://mobile.pcmag.com/news/56056-at-and-ts-hot-car-sensor-could-save-babies-lives?origref=http:%2F%2Fabout.att.com%2Finnovation%2Ffoundry

and here are we presenting out project on the same idea at At&T hackathon

https://www.facebook.com/attdeveloper/photos/a.757760704270652.1073741892.151603081553087/757760794270643/?type=3&theater


so this is how it started:-
I was always cribbing not to be able to go to these cool weekend hackathons since the other half of me would strictly instruct me to spend all my weekend with my darling son .. who does not get enough of me on weekdays :) (neither do i get enough of him)

One day one of my good friend tells me that she quit her job and she is gonna look into starting a startup. She asked me if i was interested ( in working/investing) to which i was not very receptive ( good thing it had no impact on your friendship) and  she also asked if I would be interested in coming to this hackathon taking place over the weekend in Dallas. She is not a techie (she is the queen of business ;)) and i though to myself .. if she is going why don't i give it a shot ? ( I will get a ride with her as well ;))

So that's how I checked one more thing on my bucket list .. "attend a hackathon".

Since i had absolutely not idea about the hackathon i was going to .. I was totally unprepared. I did not have an idea .. and I just assumed I will just join somebody's  team  and work on their idea (whichever idea appealed to me). We had just bought a new laptop ..I ripped its packaging took it to the hackathon.

This was the hackathon we attended :- AT&T connected car hackathon 2014
 http://www.eventbrite.com/e/att-mobile-app-hackathon-dallas-connected-car-tickets-12156796305

Once we reached there I found a lot of folks ..sitting around .. not talking too much and still mingling around with "Hi" and Hellos.  I was happy to see guacamole and chips ( I was hungry !!)  I think there are many others like me who would go to hackathons jsut for free food ;) ( if only they served good vegetarian food and did not have families to take care of)

As per my nature .. and since I had not looked into the topic at all before ..I started asking people questions.."what is a connected car?", "what can a connected car do?" " do we have a cpapabilities document on connected car?" "what is your idea?" e.t.c e.t.c   Sometimes I got smirks, sometimes unrelated comments and sometimes a big laugh .. and out of all those was the most useful comment "its a hackathon .you can make the connected car do whatever you want .. hypothetically speaking..nobody has specs/asnwers/documentation e.t.c in a hackathon ..just a theme"

That comment was pretty revealing and got my brain cells racing .. then came the pitch time and there were a handful of ideas ( i guess 4-5 ) that were pitched .. i was suprised since there were soo many people out there i expected more ideas i could choose from.
and the sad part was that none of the ideas were on which i would want to work on .. since most of them were jsut about more and more data consumption. "A freind is going on a road trip .. this idea is to make the song playlist of the road-tripper crowd sourced from his friends"  and there were  3-4 more ideas along the same line of though .. "speeding and cop around ..raise an alert" e.t.c  Later on i was told that not everybody who comes with an idea lieks to pitch it .. they like to keep their idea secret and work in secret .. ( to me that totally did not make sense ..since I though attendees came here to work together on some idea ..not in silos) ..Respectfully all were nice ideas but none good enough to entice me  and now I had to make a choice .. either i work for their idea ( which i do not like ) or I leave or the last option is I come up with a idea i like and pitch it!!

I took the last option and since connected car can do anything you want ..had my brain cells still racing my idea was ..."can we make a smart car realize/detect there is a baby in the car locked in high heat and alert the parent?"  I scoped it out more while pitching .. How about we put something in place in baby's carseats to detect that baby is in the car alone and the car is locked and may be a sensor on car to detect car's temperature and then If all these conditions are satisfied then "extreme temp+baby in locked car alone" -> send message to car's oswner's cellphone (text/call/pushnotification/anything)

I gathered all my courage and pitched the idea since i know as a mother .. this was my biggest fear.. so many babies die every summer in texas in a matter of minutes because of being locked in car accidentally .. specially for new parents exhaustion is very real .. you are soo exhausted/absent mindede with soo many things to take care of it is a very realistic scenario that you forget that you have a little passenger in the back.  By the time you come back its too late .. sometimes the temperature rises too quickly and it happens all too fast !!

Finally I was the last one to pitch this new minted idea by my brain and people heard it .. some complained that i am not speaking loud enough .. so I shouted on top of my voice .. the idea (with passion :) )  ...Could not entice many .. some looks were encouraging but not many came forward . I assumed nobody is interested. My friend was .. and she said she could market the idea :) ..then 3 more folks came (all parents i think ..though i did not ask .. but who could relate to the idea i guess)

AND we have a team!! I was happy .. we all went home to start working on the idea next morning. ( while the winning team stayed overnight and worked on the idea right away :))

Next day we worked on the idea .. I must admit we did make good progress but not a stellar progress on the idea I admit and I realized how true the saying is "ideas are dime a dozen .. its the execution that matters".
By the time it was demo time in the evening we were able to "simulate temperature rising in a car" through a script and send pushnotification and place calls  one a given cellphone number when the temperature crosses the threshold. We had many other things we wanted to work on "a thermal sensor in to place in car" for temperature detection , "a visual sensor in car" (camera?) to detect baby in the car seat. (later one some people suggested we should also consider pets for this idea ..though detecting a baby was easier since baby would be in car seat visual matching is easier) ...but there is limited time and energy.

When the time for presentations came .. it was extremely interesting to see what other people had some up with. even though the ideas in my opinion were not that impressive .. some of the exceution of ideas totally blew me over .. like wow .. they did all this in last 24 hrs? amazing!!
Then came a team of 2 girls .. who basically pretty much copied our idea and implemented the hardware side of it. I could not believe my eyes!! None of us could .. they blatantly copied our idea ..put a spin on it and basically demo'd who their sensor with detect a change in temperature in the car.

I felt sooooo disappointed .. are like back to high-school .. with petty jealousies and competition wars ? why the hell did these 2 girls not join our team rather than copying( or should i call stealing) the idea? we had the software side figured out ..they had the hardware side .. we could have actually presented  and working end to end solution!!!

That was my biggest experience .. that no matter your age .. deep inside we are all insecure scared and competitive :)

we did not win  .. the idea with the crowd-sourced play list on a road trip won ..  http://www.eventbrite.com/e/att-mobile-app-hackathon-dallas-connected-car-tickets-12156796305


I wished there were more ideas on solving real-life problems .. rather than jsut more data consumption apps :( but then who am I to judge ? FB, twitter all are succesfull.

  I think in these things, more realistic and practical ideas don't get the attention or winning results but only those that seem cool do.

The most interesting thing is that recently I came across this :)
:-

http://mobile.pcmag.com/news/56056-at-and-ts-hot-car-sensor-could-save-babies-lives?origref=http:%2F%2Fabout.att.com%2Finnovation%2Ffoundry


Is it too much of a coincidence ?? That i pitch the same idea a year ago in a AT&T hackathon and then they come up with a technology on the same idea? Or are ideas everywhere dime a dozen??

Coming across this post is what actually made me realise that i should have written this post last year rather than this year .. but then as somebody wisely said i guess ..its the execution that matters and I am glad at&t took the idea ahead ..

Lessons learned from my first hackathon:-

1) be discreet about your idea
2) go well prepared with softwares , IDE e.t.c that you will need
3) may be not go to hackathons .. to reveal your real idea but just learn other's ideas and execute their ideas (since they might never find out)
4) blog about your idea .. before the company that sponsored your hackathon claims it as theirs.
5) Get some students on yrou team who can work overnight on your idea ;)

Monday, August 17, 2015

Safenet Hardware Security Module configuration for the first time.

Safenet HSM comes with a lot of documentation .. which is good .. the sad part is  I found it a little too verbose.
if you want to read it all here is the link
http://cloudhsm-safenet-docs-5.3.s3-website-us-east-1.amazonaws.com/007-011136-006_lunasa_5-3_webhelp_rev-c/startpage.htm

If you juts got the hardware and want to know how to configure it quickly here are the steps
  1. connect to the serail console 
  2. login with default appliance credentials if you are logging in for the first time (admin , PASSWORD)
  3. Change Password:as soon as you do that you will be asked to change the password ( atleast 3 characters from the these categories letters, numbers, special characters)
  4. using h or ? you can get a list of commands
  5. You can change/recover passwords (Note is this "appliance admin password" write it down carefully)
  6. Sett time zone Next check date, time, zone :-
    lunash:>status date
    lunash:>status time
    lunash:>status zone
  7. if its incorrect set it up correctly using :-
    lunash:>sysconf timezone set America/Chicago
    *** note above 7 steps will be done the first time HSM is powered on****
  8. configure network (hostname, domain, interfaces)
    lunash:> network hostname yourhostname 
    lunash:> network domain yourdomain
    lunash:>net interface  -device eth0 -ip 1.1.1.1  -netmask 255.255.255.255 -gateway   1.2.2.3.
  9. verify network  configuration (Note: make sure links are up..else go check on the eth port connections, ping ips to verify )
    lunash:>net show
    net-show

      [yourHSM] lunash:>net show                        


       Hostname:          "yourhostname"
       Domain:            "yourdomain"

       IP Address (eth0): 1.1.1.1
       HW Address (eth0): 00:00:00
       Mask (eth0):       255.255.255.255
       Gateway (eth0):    1.2.2.3

       Name Servers:      10.0.80.11        10.0.80.12    
       Search Domain(s):  softlayer.local 

    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    1.1.1.1        0.0.0.0         255.255.255.255          U     0      0        0 eth0
    1.0.0.0        1.2.2.3          255.0.0.0                  UG    0      0        0 eth0

    Link status
      eth0: Configured   
            Link detected: yes

      eth1: Not configured
  10. Generate certificate: Certificate can be generated following ways (use the ip if you do not have DNS configured)
    lunash:>sysconf regenCert
    lunash:>sysconf regenCert 11.1.1.1
  11. lunash:>ntls bind eth0



Now if you want you can go further and start playing with it.

  1. Initialize HSM :
    lunash:>hsm init -label myhsm -domain thisiscliningdomain -password *** -force
  2. Create Partition:
    lunash:>hsm login
    lunash:>partition create -partition myPartition1
     

Hardware Security Module :- lock your master key and never let it leave

A hardware security module (HSM) is a physical computing device that safeguards and manages digital keys for strong authentication and provides cryptoprocessing. These modules traditionally come in the form of a plug-in card or an external device that attaches directly to a computer or network server.  (from wiki)




A hardware security module (HSM) is a physical device that provides secure storage for encryption keys. It also provides secure computational space (memory) to perform encryption and decryption operations.

HSM provides secure cryptographic key storage and operations within a tamper-resistant hardware device.HSM is worth looking into ,Whenever security, compliance, key management e.t.c are of utmost importance.
A hardware security module can be employed in any application that uses digital keys. Typically the keys must be of high-value - meaning there would be a significant, negative impact to the owner of the key if it were compromised.
The functions of an HSM are:
  • onboard secure cryptographic key generation
  • onboard secure cryptographic key storage and management
  • use of cryptographic and sensitive data material
  • offloading application servers for complete asymmetric and symmetric cryptography.
Here we list some uses cases, practical/possible applications of HSM :-

  • Database -TDE( transparent data encryption):-
    Several commercial database engines support a feature called transparent data encryption (TDE) that can seamlessly encrypt the data in a database.Transparent data encryption can use HSM to provide enhanced security for sensitive data. An HSM is used to store the master encryption key used for transparent data encryption. The key is secure from unauthorized access attempts as the HSM is a physical device and not an operating system file. All encryption and decryption operations that use the master encryption key are performed inside the HSM. This means that the master encryption key is never exposed in insecure memory.
  • Cryptographic accelerator:-
    HSM delivers significant performance benefits and reduces hardware costs. HSMs can provide significant CPU offload for asymmetric key operations. Can not compete with hardware-only solutions for symmetric key operations though. Performances ranges from 1 to 7,000 1024-bit RSA signs/second.
  •  Compliance sensitive industries:-
    wherever data is sensitive , critical and highly personal it needs to be encrypted. Healthcare industry , Legal industry, Finance industry, government, banks... all have to deal with lot of compliance clearance to make sure their data/documents/information is all using high standard encryption and key management standards.. HSMs can help in enforcing PCI DSS, PCI PTS compliance , DES compliance, FIPS compliance , HIPAA compliance,  TR-39 compliance. Mostly all follow the sign and decrypt data, but the private keys are located at a HSM model
  • Certificate Management:-
     HSM  can also be used as service to generate certificates, sign certificate signing requests (CSRs), and to store private keys used with certificates. The CloudHSM is typically used as an architectural building block and root of trust in these applications
  •  EMV data preparation and card personalization
  •  Remote key loading for ATM networks
  •  Point-to-Point Encryption (P2PE) of cardholder data
  •  Credit, debit, and prepaid card fraud prevention
  •  MAC calculation to ensure integrity of data in transit and at rest
  •  Dynamic key exchange for Point of Sale and ATM
  •  PIN translation and verification
  •  One-time password generation for online security :-
    Most OTP (One Time Password) solutions are based on a long secret random seed value. Somehow this needs to be stored at the validating server as well to be able to verify the submitted OTP value.
    In a way these seeds have the same role as user supplied passwords and need to be stored equally secure. Salting & hashing will not work here as this will break the OTP algorithm.
    Most small OTP-tokens are physically secured by being more or less tamper-proof but this does not apply to the server.Do all cryptographic computations in the HSM
  • SSL offloading
  • Sample Applications:

    • PKI key generation & key
    • Storage (online CA keys & offline CA keys)
    • Certificate validation & signing
    • Document signing
    • Transaction processing
    • Database encryption
    • Smart card issuance
    - See more at: http://www.safenet-inc.com/data-encryption/hardware-security-modules-hsms/luna-hsms-key-management/luna-sa-network-hsm/#content-left


Monday, August 10, 2015

python-wns to send push notifications to windows

Hey folks

Here is an easy way to send push notification to windows mobiles.

https://github.com/Neetuj/python-wns

This is a follow up for my previous post

http://workstuffcareer.blogspot.com.br/2014/11/push-notifications-on-apns-gcm-and.html

and now you can install it from pip

pip install python-wns


When I was working on push notifications it was interesting to see how there are packages for GCM , IOS..andriod apple phones but none for windows phones
well yeah windows has earned a bad name in the opensource world but lets me nice to the new guy in our world :) I guess they are trying to make friends in here .. so here is my welcome to them warm wishes from python-wns