[Kde-hardware-devel] [Patch] bluedevil: allow PINs of less than 4 digits when initialising a pairing, too

Torsten Duwe duwe at suse.de
Wed Nov 24 17:26:59 CET 2010


The standard does not require PINs to have a minimum length, at HCI layer 
protol level there is room for a hex number up to 128 bits (16 hex digits).
Four digits may already be too little, see e.g.
http://www.schneier.com/blog/archives/2005/06/attack_on_the_b_1.html
Do not make any false security promises and let the user decide.

Sigend-off-by: Torsten Duwe <duwe at suse.de>

--
 pin.ui      |    5 ++++-
 pinpage.cpp |    4 ++--
 2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/wizard/pages/pin.ui b/src/wizard/pages/pin.ui
index 6ae86a3..364bfce 100644
--- a/src/wizard/pages/pin.ui
+++ b/src/wizard/pages/pin.ui
@@ -113,7 +113,10 @@
        <item>
         <widget class="QLabel" name="label_2">
          <property name="text">
-          <string>&lt;html&gt;&lt;body&gt;&lt;p&gt;Choose this option only if 
you know the PIN of your devices which &lt;b&gt;cannot be empty&lt;/b&gt; and 
must be at least &lt;b&gt;4 
numbers&lt;/b&gt;.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+          <string>&lt;html&gt;&lt;body&gt;
+	    &lt;p&gt;Choose this option only if you know the PIN of your devices 
which &lt;b&gt;cannot be empty&lt;/b&gt;.&lt;/p&gt;
+	    &lt;p&gt;Four digits are most common, but depending on the device and 
the situation more are recommended.&lt;/p&gt;
+	    &lt;/body&gt;&lt;/html&gt;</string>
          </property>
          <property name="wordWrap">
           <bool>true</bool>
diff --git a/src/wizard/pages/pinpage.cpp b/src/wizard/pages/pinpage.cpp
index a929d31..980540e 100644
--- a/src/wizard/pages/pinpage.cpp
+++ b/src/wizard/pages/pinpage.cpp
@@ -62,9 +63,9 @@ bool PinPage::isComplete() const
 {
     if (manualBtn->isChecked()) {
         if (!pinEdit->text().isEmpty()) {
-            if (pinEdit->text().length() > 3) {
+            
                 return true;
-            }
+           
         }
         return false;
     }


More information about the Kde-hardware-devel mailing list