The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Archive for August, 2020

DIY electronic RFID Door Lock with Battery Backup – CodeProject

Posted by jpluimers on 2020/08/26

On my list: check if Mifare Desfire cards are still secure enough for something like a [WayBackDIY electronic RFID Door Lock with Battery Backup – CodeProject.

Via: [WayBack] Lots of interesting info on RFID use. https://www.codeproject.com/Articles/1096861/DIY-electronic-RFID-Door-Lock-with-Battery-Backup – Lars Fosdal – Google+

–jeroen

Posted in Development, Hardware Development, LifeHacker, Power User, Security | Leave a Comment »

Password hashing on client side is insecure · Issue #44 · meteor/meteor-feature-requests · GitHub and some bcrypt notes

Posted by jpluimers on 2020/08/26

Some interesting bits from [WayBack] Password hashing on client side is insecure · Issue #44 · meteor/meteor-feature-requests · GitHub by tysonclugg:

Stop with the client side hashing – it’s security theatrics. Submit plain text passwords over TLS. The focus should be on having TLS enabled by default, and making sure the server has a sufficient amount of cryptographic work-factor during authentication to render brute-force attacks ineffective (eg: use server-side bcrypt).

Honestly, javascript password shenanigans in the browser is as dumb as backing up HOTP/TOTP secrets from your 2FA app in case you lose your phone. Hint: that changes “something you have” into “something you know”, authenticating with two things you know is single factor authentication. And yet, a group of “smart people” created an app that allows just that. Don’t be another one of those “smart people”.

If you’re still unsure about ditching client-side password hashing, have a read on what others have said:

  1. https://www.nccgroup.trust/us/about-us/newsroom-and-events/blog/2011/august/javascript-cryptography-considered-harmful/
  2. http://thisinterestsme.com/client-side-hashing-secure/
  3. https://security.stackexchange.com/questions/53594/why-is-client-side-hashing-of-a-password-so-uncommon
  4. https://cybergibbons.com/security-2/stop-doing-client-side-password-hashing/
  5. https://www.reddit.com/r/crypto/comments/375lor/is_client_side_hashing_of_passwords_viable_to/
    5.1. One of the comments specifically mentions SRP, but goes on to say:

You’ll probably be interested in the Secure Remote Password protocol (SRP). It uses a variant of the Diffie-Hellman key negotiation protocol to simultaneously authenticate the client with the server, the server with the client, and establish a session key for sending secrets between the client and server. It’s not very useful with web applications, because you still have to trust the encrypted channel to deliver the right version of the JavaScript to manage the communication. It could be useful for other client/server applications, where the client application can be verified and isn’t retransmitted every session.

If you’re still not convinced after reading all of the above, I’d suggest you contact a notable cryptographer for further advice. Prof. David A. Wagner might be a good choice.

Meanwhile, client side password hashing hinders upgrades to the password hashing scheme, and nothing has been done.

Hindering, not preventing. Of course you can send many hashed variants of the password from the client to the server to account for whichever legacy hash exists in the DB, but in my that weakens the system by allowing many hashes to be submitted simultaneously (or in short order) with no work factor. The result is that brute forcing an account becomes much easier.

and in [WayBack] Password hashing on client side is insecure · Issue #4363 · meteor/meteor · GitHub:

On compatibility (the reason I visited the Meteor password hashing code in the first place), upgrading to new hashing algorithms (which MUST be done from time to time) is much easier if the plaintext password is passed to the server, and transparent to the client as no new API is required to handle the case of upgrading from an old hash to a new hash. The generally accepted means of storing hashes is “$” such as “pbkdf2_sha256$15000$ZLpQISRxzhY0$fxrQcKxhkG//nHg10NrkulhvWkAqWbWeQg4QeD7c59E=
This is a PBKDF2 hash for the password “pass” which includes the number of rounds, the salt and the resultant hash ready to be verified and upgraded if required, for example by increasing the number of rounds from 150000 to 250000, or ready to be swapped to a different algorithm altogether (eg: pbkdf2_sha512).

NIST in 2017 on key derivation functions:

In June 2017, NIST issued a new revision of their digital authentication guidelines, NIST SP 800-63B-3,[12]:5.1.1.1 stating that: “Verifiers SHALL store memorized secrets [i.e. passwords] in a form that is resistant to offline attacks. Memorized secrets SHALL be salted and hashed using a suitable one-way key derivation function. Key derivation functions take a password, a salt, and a cost factor as inputs then generate a password hash. Their purpose is to make each password guessing trial by an attacker who has obtained a password hash file expensive and therefore the cost of a guessing attack high or prohibitive.” and that “The salt SHALL be at least 32 bits in length and be chosen arbitrarily so as to minimize salt value collisions among stored hashes.”

It looks like Argon2 is better than bcrypt and PBKDF2_SHA512. The 2017 hashing speed table:

sha1: 68.000.000.000 hash/s
sha256: 23.000.000.000 hash/s
sha512: 8.600.000.000 hash/s
sha3: 6.500.000.000 hash/s
bcrypt(5): 105.700 hash/s(for work factor 15 it’s {\displaystyle {\frac {105700}{2^{15-5}}}=103} hash/sec)
sha256crypt: 3.100.000 hash/s
And with stretching:
pbkdf2-sha1(1000 r): 26.000.000 hash/s
pbkdf2-sha256: 9.400.000 hash/s
pbkdf2-sha512: 3.400.000 hash/s

Also, one commenter mentioned that using future telling skills we expect that hash values improve 55% annually, which is exciting and scary at once. —grin 13:51, 10 October 2017 (UTC)

The cost is confirmed at [WayBack] bcrypt cost 10/12/14 brute force time? – Information Security Stack Exchange, so in 2020 it should be somewhere around the 12-14 range.

Moore’s law does not fully apply any more for single core performance, but there are other potential optimisations, and it is unclear how future hash attacks will improve, so it is better to use a mini-bench mark to calculate a good cost, see:

Delphi implementations:

Via:

Further reading:

–jeroen

Posted in Development, Hashing, Power User, Security, Software Development | Leave a Comment »

“Fatal: F1027 Unit not found: ‘System.pas’ or binary equivalents (.dcu)”

Posted by jpluimers on 2020/08/25

If you ever get a “Fatal: F1027 Unit not found: ‘System.pas’ or binary equivalents (.dcu)” – Google Search, then it is likely because you:

  1. build from a script
  2. build use a user that has never ran the Delphi IDE

This is common for unattended builds (like build-automation).

For each run, the Delphi IDE will save an EnvOptions.dproj with global settings.

Since build scripts should not rely on global settings, you need to ensure those are in your project settings.

Some background reading on this:

–jeroen

Posted in Delphi, Development, Software Development | Leave a Comment »

Spring4D – Shared, Weak references

Posted by jpluimers on 2020/08/25

In addition to Shared/IShared, there is also Weak/IWeakReference in Spring.pas; these blog post explain more about them:

Related: If you were using Managed / IManaged in Spring4D, be aware they got renamed to Shared / IShared.

–jeroen

Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development | Leave a Comment »

10 Tips on How to be a Great Programmer – Java, SQL and jOOQ.

Posted by jpluimers on 2020/08/25

Interesting thoughts: [WayBack10 Tips on How to be a Great Programmer – Java, SQL and jOOQ.

Via: [WayBack] The bitterness of poor quality remains long after the sweetness of low price is forgotten — Benjamin Franklin (not sure this is true, could not find a source) – Thomas Mueller (dummzeuch) – Google+

–jeroen

Posted in Conference Topics, Conferences, Development, Event, Software Development | Leave a Comment »

Assorted unpitched concert percussion videos

Posted by jpluimers on 2020/08/24

Lots of videos below the fold. Most from VicFirth, but not all.

–jeroen

Read the rest of this entry »

Posted in LifeHacker, Music, Power User | Leave a Comment »

Small query for some SQL Server client and server information

Posted by jpluimers on 2020/08/24

Sometimes in a less paved SQL Server environment you need a quick way to gather information on both the client and server. I assembled this query from various sources to help with that. It runs with few privileges (hence the use of the various *property functions):

-- https://dev-doc.blogspot.com/2012/08/ms-sql-2008-client-ip-address-on-shared.html
-- https://blog.sqlauthority.com/2009/05/26/sql-server-find-hostname-and-current-logged-in-user-name/
-- https://blog.sqlauthority.com/2015/07/13/sql-server-how-to-change-server-name/
-- https://social.msdn.microsoft.com/Forums/sqlserver/en-US/6720817d-120f-4099-bf0e-e97fd2e26848/how-to-get-host-name-and-sql-instance-name-by-tsql?forum=transactsql#fc9e6b84-0264-424a-8aef-d03b0de6fade
select
  -- https://docs.microsoft.com/en-us/sql/t-sql/functions/connectionproperty-transact-sql?view=sql-server-2017
  CONNECTIONPROPERTY('net_transport') AS net_transport,
  CONNECTIONPROPERTY('protocol_type') AS protocol_type,
  CONNECTIONPROPERTY('auth_scheme') AS auth_scheme,
  CONNECTIONPROPERTY('local_net_address') AS local_net_address,
  CONNECTIONPROPERTY('local_tcp_port') AS local_tcp_port,
  CONNECTIONPROPERTY('client_net_address') AS client_net_address,
  HOST_NAME() AS client_hostname,
  SUSER_NAME() LoggedInUser,
  @@servername AS 'ServerName\InstanceName',
  -- https://docs.microsoft.com/en-us/sql/t-sql/functions/serverproperty-transact-sql?view=sql-server-2017
  SERVERPROPERTY('ServerName') AS 'ServerName',
  SERVERPROPERTY('MachineName') AS 'Windows_MachineName',
  SERVERPROPERTY('ComputerNamePhysicalNetBIOS') AS 'NetBIOS_Name',
  SERVERPROPERTY('instanceName') AS 'InstanceName',
  SERVERPROPERTY('IsClustered') AS 'IsClustered',
  SERVERPROPERTY('Edition') AS 'Edition',
  -- https://docs.microsoft.com/en-us/sql/t-sql/functions/version-transact-sql-configuration-functions?view=sql-server-2017
  @@Version as 'Full_Server_Version'
;

Based on parts from:

Features used:

–jeroen

Read the rest of this entry »

Posted in Database Development, Development, SQL Server | Leave a Comment »

Some awesome Sugru moldable glue links

Posted by jpluimers on 2020/08/24

Suguru is a moldable glue that cures (settles/hardens) because of moisture and temperature (see the [WayBack] tech PDF.

Keeping it longer than the standard 13 month shelf life (at room temperature in original packaging) works best in a moist free, cold environment.

It is excellent for doing some cable repair (especially for those pesky expensive USB-C, lightning, magsafe 2 or magsafe connectors of which the middle 2 are most prone to damage).

It glues best to hard surfaces, though the materials it glues to varies (see also the tech PDF).

Some more links:

Via: [WayBack] Welk vakantiegadget raad jij je medetweaker aan? – IT Pro – .Plans – Tweakers

–jeroen

Read the rest of this entry »

Posted in LifeHacker, Power User | Leave a Comment »

Some more interesting OpenWrt capable routers/ATAs

Posted by jpluimers on 2020/08/24

Interesting devices running OpenWrt:

–jeroen

Posted in Internet, Power User, routers | Leave a Comment »

Current state: still fighting the metastases of the rectum cancer; chemos are done, major liver surgery in about 3 weeks

Posted by jpluimers on 2020/08/23

A long follow-up of Current state: still fighting with rectum cancer, but chances for better quality of life which does not even include everything, because so much happened.

So this is the current state; browse back via Twitter for more of the history which you can find at [Archive.is] Jeroen Pluimers on Twitter: “Too much to let sink in …” and [Archive.is] Jeroen Pluimers (@jpluimers) | Twitter.

Read the rest of this entry »

Posted in About, Cancer, Conference Topics, Conferences, Event, Personal, Rectum cancer | 1 Comment »