secure offline PC storage accessible through javascript

I’m attempting to build a browser-based HTML5 application that has the ability to store data locally on a PC (not mobile device) when offline. This data is sensitive and must be secure.

Of course the trick is trying to find a way to be able to access the secure data with Javascript.

I’ve ruled out browser local storage since its not secure. Could this be accomplished with a local database? If so, where could the DB credentials be stored? Javascript obviously doesn’t seem like a good option to store them since its user-readable.

4

Unfortunately, there is no way to do cryptography securely in JavaScript. To summarize key points of the link:

  1. JavaScript has no secure random number generator and no secure key store, meaning it cannot securely generate or store encryption keys.
  2. There is no way to guarantee the browser itself is not compromised.
  3. Without SSL/TLS, there is no way to guarantee the data or code loaded by the browser was that provided by the server.

You can encrypt data on the server then send the data to the client over SSL/TLS. However, once the data is there, you need something to decrypt it, which requires storing the key. Unfortunately, there is no way to securely store the key. Neither local storage nor browser specific systems, e.g. chrome.storage, are encrypted.

There are other options, including ActiveX controls, Java applets, Adobe AIR or Adobe Flash apps. Unfortunately, all of these come either their own security issues or are platform specific. You could write browser plug-ins but these are also browser and sometimes platform specific.

This data is sensitive and must be secure

How secure is it? Convenience or functionality usually trumps security so you will likely have to consider the trade offs, such as:

  1. Can you store some of the data and not the more secure parts? For example, if you are storing customer contact details, cache data that is not Personally Identifiable Information (PII, such as US social security numbers).
  2. Can you require a certain browser or platform? For example, if most of your customers use Windows, consider an ActiveX control or a ClickOnce desktop application. If they use Windows 8+, can you create an app on the Windows app store (as much as this suggestion may make some shudder)?
  3. Does the data change frequently, so the impact of a compromise is small?

Also remember that secure storage is not the only thing to consider. Even if you solve this issue, there is no point storing data securely if it is not delivered over SSL/TLS (so it can be viewed or tampered with in transit) or if you use weak or poor authentication (e.g. unencrypted and unhashed authentication cookie). Similarly, given physical access to the storage medium, there is no way to protect the data from a determined, patient attacker even if it is encrypted.

Maybe store data in the cookies encrypted? Or use a 1×1 pixel flash app that talks with the javascript to do things javascript can’t do, even talking to an Flash AIR app on the desktop using “LocalConnection” possibly, to give more access to the desktop.

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

secure offline PC storage accessible through javascript

I’m attempting to build a browser-based HTML5 application that has the ability to store data locally on a PC (not mobile device) when offline. This data is sensitive and must be secure.

Of course the trick is trying to find a way to be able to access the secure data with Javascript.

I’ve ruled out browser local storage since its not secure. Could this be accomplished with a local database? If so, where could the DB credentials be stored? Javascript obviously doesn’t seem like a good option to store them since its user-readable.

4

Unfortunately, there is no way to do cryptography securely in JavaScript. To summarize key points of the link:

  1. JavaScript has no secure random number generator and no secure key store, meaning it cannot securely generate or store encryption keys.
  2. There is no way to guarantee the browser itself is not compromised.
  3. Without SSL/TLS, there is no way to guarantee the data or code loaded by the browser was that provided by the server.

You can encrypt data on the server then send the data to the client over SSL/TLS. However, once the data is there, you need something to decrypt it, which requires storing the key. Unfortunately, there is no way to securely store the key. Neither local storage nor browser specific systems, e.g. chrome.storage, are encrypted.

There are other options, including ActiveX controls, Java applets, Adobe AIR or Adobe Flash apps. Unfortunately, all of these come either their own security issues or are platform specific. You could write browser plug-ins but these are also browser and sometimes platform specific.

This data is sensitive and must be secure

How secure is it? Convenience or functionality usually trumps security so you will likely have to consider the trade offs, such as:

  1. Can you store some of the data and not the more secure parts? For example, if you are storing customer contact details, cache data that is not Personally Identifiable Information (PII, such as US social security numbers).
  2. Can you require a certain browser or platform? For example, if most of your customers use Windows, consider an ActiveX control or a ClickOnce desktop application. If they use Windows 8+, can you create an app on the Windows app store (as much as this suggestion may make some shudder)?
  3. Does the data change frequently, so the impact of a compromise is small?

Also remember that secure storage is not the only thing to consider. Even if you solve this issue, there is no point storing data securely if it is not delivered over SSL/TLS (so it can be viewed or tampered with in transit) or if you use weak or poor authentication (e.g. unencrypted and unhashed authentication cookie). Similarly, given physical access to the storage medium, there is no way to protect the data from a determined, patient attacker even if it is encrypted.

Maybe store data in the cookies encrypted? Or use a 1×1 pixel flash app that talks with the javascript to do things javascript can’t do, even talking to an Flash AIR app on the desktop using “LocalConnection” possibly, to give more access to the desktop.

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật