2
0

Compare commits

...

22 Commits

Author SHA1 Message Date
Maarten Billemont
5b08149ca6 Fix a crash on older OS X versions. 2015-02-02 14:48:12 -05:00
Maarten Billemont
58afc19c26 Make string constants C constants, not macros. 2015-02-02 14:47:16 -05:00
Maarten Billemont
b3109187e9 Some project cleanup. 2015-01-31 11:08:22 -05:00
Maarten Billemont
a6e7a749bf Android improvements.
[UPDATED]   Opal API
[ADDED]     Scrypt native binaries for more archs.
[IMPROVED]  Android activity secure.
[FIXED]     White background on buttons for some devices.
[IMPROVED]  Android layout.
[WIP]       Remember password on Android.
2015-01-31 10:55:08 -05:00
Maarten Billemont
ca5d83d40c Put LDFLAGS after .o files that use them for compatibility with the 11.10+ linker. 2015-01-29 14:37:15 -05:00
Maarten Billemont
285813324f mpw-js is now back in sync with Tom's repo. 2015-01-23 08:31:50 -05:00
Maarten Billemont
d4b772b467 Update to Tom's latest mpw-js to fix issues with maximum security passwords. 2015-01-23 08:14:13 -05:00
Maarten Billemont
f392ad4053 Merge branch 'master' of github.com:Lyndir/MasterPassword 2015-01-21 11:12:23 -05:00
Maarten Billemont
35990f3bdd Update Java GUI. 2015-01-21 09:11:14 -05:00
Maarten Billemont
3932857c21 Fix for not being able to copy the password from the password field. 2015-01-21 09:07:57 -05:00
Maarten Billemont
6f771a972b his -> their. 2015-01-20 10:37:43 -05:00
Maarten Billemont
806a07135a Update 2.1-cli4 again. 2015-01-19 23:32:26 -05:00
Maarten Billemont
f6b2287778 Build fixes for iOS and Mac. 2015-01-19 23:30:19 -05:00
Maarten Billemont
f4e90bb839 Update 2.1-cli4 2015-01-19 23:23:10 -05:00
Maarten Billemont
21630e919b Standardize includes for other POSIX platforms. 2015-01-19 23:21:10 -05:00
Maarten Billemont
ae74ab6906 Site references to mpw-cli C packages. 2015-01-19 23:07:49 -05:00
Maarten Billemont
caf361cd10 Rename mpw formula. 2015-01-19 21:54:50 -05:00
Maarten Billemont
aeedc1946e Some audit fixes to mpw.rb. 2015-01-19 21:53:41 -05:00
Maarten Billemont
93ae31f679 An initial Homebrew formula for installing mpw. 2015-01-19 21:48:44 -05:00
Maarten Billemont
d5ff215da2 Support for passing the master password non-interactively for testing. 2015-01-19 21:34:54 -05:00
Maarten Billemont
b34f7377da Handle dependencies unpacked by a package manager. 2015-01-19 20:58:53 -05:00
Maarten Billemont
0c2e182039 Release a new C CLI and update links. 2015-01-19 17:22:05 -05:00
46 changed files with 266 additions and 161 deletions

3
.gitignore vendored
View File

@@ -28,9 +28,6 @@ Press/MasterPassword_PressKit/MasterPassword_pressrelease_*.pdf
/sendipa/*
!/sendipa/sendipa.conf
# Java
MasterPassword/Java/**/target
# C
MasterPassword/C/VERSION
MasterPassword/C/*.o

2
.gitmodules vendored
View File

@@ -18,4 +18,4 @@
url = git://github.com/jonmarimba/jrswizzle.git
[submodule "Site/mpw-js/js/mpw-js"]
path = Site/mpw-js/js/mpw-js
url = https://github.com/Lyndir/mpw-js.git
url = https://github.com/tmthrgd/mpw-js.git

2
External/Pearl vendored

View File

@@ -81,11 +81,15 @@ unpack() {
mv "$files"/* .
rmdir "$files"
fi
touch .unpacked
}
fetchSource() (
source .source
if [[ $pkg && -e "${pkg##*/}" ]]; then
if [[ -e .unpacked ]]; then
true
elif [[ $pkg && -e "${pkg##*/}" ]]; then
files=( !("${pkg##*/}") )
[[ -e $files ]] || {
echo
@@ -135,11 +139,14 @@ fetchSource() (
exit 1
fi
for patch in "${patches[@]}"; do
echo
echo "Patching: ${PWD##*/}, for $patch..."
patch -p0 < ../"${PWD##*/}-$patch.patch"
done
if [[ ! -e .patched ]] && (( ${#patches[@]} )); then
for patch in "${patches[@]}"; do
echo
echo "Patching: ${PWD##*/}, for $patch..."
patch -p0 < ../"${PWD##*/}-$patch.patch"
done
touch .patched
fi
)
depend() {
@@ -220,8 +227,8 @@ mpw() {
cc "${CFLAGS[@]}" "$@" -c mpw-algorithm.c -o mpw-algorithm.o
cc "${CFLAGS[@]}" "$@" -c mpw-types.c -o mpw-types.o
cc "${CFLAGS[@]}" "$@" -c mpw-util.c -o mpw-util.o
cc "${CFLAGS[@]}" "${LDFLAGS[@]}" "$@" "mpw-algorithm.o" "mpw-types.o" "mpw-util.o" \
mpw-cli.c -o mpw
cc "${CFLAGS[@]}" "$@" "mpw-algorithm.o" "mpw-types.o" "mpw-util.o" \
"${LDFLAGS[@]}" "mpw-cli.c" -o "mpw"
echo "done! Now run ./install or use ./mpw"
}
@@ -257,8 +264,8 @@ mpw-bench() {
-l"crypto"
)
cc "${CFLAGS[@]}" "${LDFLAGS[@]}" "$@" "mpw-algorithm.o" "mpw-types.o" "mpw-util.o" \
mpw-bench.c -o mpw-bench
cc "${CFLAGS[@]}" "$@" "mpw-algorithm.o" "mpw-types.o" "mpw-util.o" \
"${LDFLAGS[@]}" "mpw-bench.c" -o "mpw-bench"
echo "done! Now use ./mpw-bench"
}
@@ -273,6 +280,7 @@ mpw-tests() {
# include paths
-I"lib/include"
-I"/usr/include/libxml2"
-I"/usr/local/include/libxml2"
)
LDFLAGS=(
# scrypt
@@ -288,9 +296,9 @@ mpw-tests() {
-l"crypto" -l"xml2"
)
cc "${CFLAGS[@]}" "$@" -c mpw-tests-util.c -o mpw-tests-util.o
cc "${CFLAGS[@]}" "${LDFLAGS[@]}" "$@" "mpw-algorithm.o" "mpw-types.o" "mpw-util.o" "mpw-tests-util.o" \
mpw-tests.c -o mpw-tests
cc "${CFLAGS[@]}" "$@" -c mpw-tests-util.c -o mpw-tests-util.o
cc "${CFLAGS[@]}" "$@" "mpw-algorithm.o" "mpw-types.o" "mpw-util.o" "mpw-tests-util.o" \
"${LDFLAGS[@]}" "mpw-tests.c" -o "mpw-tests"
echo "done! Now use ./mpw-tests"
}

View File

@@ -6,7 +6,7 @@
// Copyright (c) 2014 Lyndir. All rights reserved.
//
#import "mpw-types.h"
#include "mpw-types.h"
typedef enum(unsigned int, MPAlgorithmVersion) {
/** V0 did math with chars whose signedness was platform-dependent. */

View File

@@ -9,8 +9,8 @@
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <arpa/inet.h>
#include "mpw-types.h"
#include "mpw-util.h"
#define MP_N 32768

View File

@@ -9,8 +9,8 @@
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <arpa/inet.h>
#include "mpw-types.h"
#include "mpw-util.h"
#define MP_N 32768

View File

@@ -9,8 +9,8 @@
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <arpa/inet.h>
#include "mpw-types.h"
#include "mpw-util.h"
#define MP_N 32768

View File

@@ -9,8 +9,8 @@
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <arpa/inet.h>
#include "mpw-types.h"
#include "mpw-util.h"
#define MP_N 32768

View File

@@ -15,7 +15,6 @@
#include <scrypt/sha256.h>
#include <bcrypt/ow-crypt.h>
#include "mpw-types.h"
#include "mpw-algorithm.h"
#include "mpw-util.h"

View File

@@ -15,7 +15,6 @@
#define ftl(...) do { fprintf( stderr, __VA_ARGS__ ); exit(2); } while (0)
#include "mpw-types.h"
#include "mpw-algorithm.h"
#include "mpw-util.h"
@@ -112,11 +111,16 @@ int main(int argc, char *const argv[]) {
ftl( "Invalid %s: %s\n", MP_env_algorithm, algorithmVersionString );
// Read the options.
for (int opt; (opt = getopt( argc, argv, "u:t:c:v:V:C:h" )) != -1;)
for (int opt; (opt = getopt( argc, argv, "u:P:t:c:v:V:C:h" )) != -1;)
switch (opt) {
case 'u':
fullName = optarg;
break;
case 'P':
// Do not use this. Passing your master password via the command-line
// is insecure. This is here for non-interactive testing purposes only.
masterPassword = strcpy( malloc( strlen( optarg ) + 1 ), optarg );
break;
case 't':
siteTypeString = optarg;
break;

View File

@@ -5,7 +5,6 @@
#define ftl(...) do { fprintf( stderr, __VA_ARGS__ ); exit(2); } while (0)
#include "mpw-types.h"
#include "mpw-algorithm.h"
#include "mpw-util.h"

View File

@@ -7,6 +7,7 @@
//
#include <stdlib.h>
#include <stdint.h>
#ifdef NS_ENUM
#define enum(_type, _name) NS_ENUM(_type, _name)

View File

@@ -6,6 +6,8 @@
// Copyright (c) 2014 Lyndir. All rights reserved.
//
#include <stdint.h>
//// Logging.
#ifdef DEBUG
@@ -13,8 +15,10 @@
#define trc(...) fprintf( stderr, __VA_ARGS__ )
#endif
#else
#ifndef trc
#define trc(...) do {} while (0)
#endif
#endif
#ifndef ftl
#define ftl(...) do { fprintf( stderr, __VA_ARGS__ ); abort(); } while (0)
#endif

2
MasterPassword/Java/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
target
dependency-reduced-pom.xml

View File

@@ -24,12 +24,12 @@
<dependency>
<groupId>com.lyndir.lhunath.opal</groupId>
<artifactId>opal-system</artifactId>
<version>1.6-p6</version>
<version>1.6-p7</version>
</dependency>
<dependency>
<groupId>com.lyndir.lhunath.opal</groupId>
<artifactId>opal-crypto</artifactId>
<version>1.6-p6</version>
<version>1.6-p7</version>
</dependency>
<!-- EXTERNAL DEPENDENCIES -->

View File

@@ -77,15 +77,6 @@ public class MasterKey {
return idForBytes( masterKey );
}
private byte[] getSubKey(final int subkeyLength) {
Preconditions.checkState( valid );
byte[] subkey = new byte[Math.min( subkeyLength, masterKey.length )];
System.arraycopy( masterKey, 0, subkey, 0, subkey.length );
return subkey;
}
public String encode(final String siteName, final MPSiteType siteType, int siteCounter, final MPSiteVariant siteVariant,
@Nullable final String siteContext) {
Preconditions.checkState( valid );

View File

@@ -114,11 +114,10 @@
<dependency>
<groupId>com.lambdaworks</groupId>
<artifactId>libscrypt</artifactId>
<version>1.4.0</version>
<type>so</type>
<classifier>android</classifier>
<scope>runtime</scope>
<artifactId>scrypt</artifactId>
<version>1.4.0-android</version>
<type>jar</type>
<classifier>native</classifier>
</dependency>
</dependencies>

View File

@@ -12,64 +12,61 @@
android:gravity="center">
<View
android:layout_width="0dp"
android:layout_width="1dp"
android:layout_height="0dp"
android:layout_weight="1" />
<ProgressBar
android:id="@+id/progressView"
android:layout_width="wrap_content"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:indeterminate="true" />
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1" />
<EditText
android:id="@+id/userNameField"
android:layout_width="wrap_content"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:inputType="text|textCapWords|textPersonName"
android:hint="@string/userName.hint"
android:hint="@string/userName_hint"
android:gravity="center"
android:textColor="#FFFFFF"
android:textSize="26sp" />
<EditText
android:id="@+id/masterPasswordField"
android:layout_width="wrap_content"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:inputType="text|textPassword"
android:hint="@string/masterPassword.hint"
android:password="true"
android:hint="@string/masterPassword_hint"
android:gravity="center"
android:textColor="#FFFFFF"
android:textSize="18sp" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/double_"
android:contentDescription="@string/empty" />
<EditText
android:id="@+id/siteNameField"
android:layout_width="wrap_content"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:inputType="text|textNoSuggestions|textUri"
android:hint="@string/siteName.hint"
android:hint="@string/siteName_hint"
android:gravity="center"
android:textColor="#FFFFFF"
android:textSize="26sp" />
<Button
<ImageView
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginBottom="30dp"
android:src="@drawable/double_"
android:contentDescription="@string/empty" />
<TextView
android:id="@+id/sitePasswordField"
android:layout_width="wrap_content"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:gravity="center"
android:background="@null"
android:background="@android:color/transparent"
android:textColor="#FFFFFF"
android:textSize="32sp"
android:text="LuxdZozvDuma4["
@@ -77,13 +74,30 @@
<Spinner
android:id="@+id/typeField"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
android:layout_width="300dp"
android:layout_height="wrap_content"
android:gravity="center" />
<NumberPicker
<EditText
android:id="@+id/counterField"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
android:layout_width="300dp"
android:layout_height="wrap_content"
android:gravity="center"
android:inputType="text|textNoSuggestions"
android:textColor="#FFFFFF"
android:textSize="26sp"
android:text="1" />
<View
android:layout_width="1dp"
android:layout_height="0dp"
android:layout_weight="1" />
<CheckBox
android:id="@+id/rememberPasswordField"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:text="@string/remember" />
</LinearLayout>

View File

@@ -2,8 +2,9 @@
<resources>
<string name="app_name">Master Password</string>
<string name="avatar">User Avatar</string>
<string name="siteName.hint">Site Name</string>
<string name="userName.hint">Your Name</string>
<string name="masterPassword.hint">Your Master Password</string>
<string name="remember">Remember Password</string>
<string name="siteName_hint">Site Name</string>
<string name="userName_hint">Your Name</string>
<string name="masterPassword_hint">Your Master Password</string>
<string name="empty" />
</resources>

View File

@@ -9,12 +9,14 @@ import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.view.WindowManager;
import android.widget.*;
import butterknife.ButterKnife;
import butterknife.InjectView;
import com.google.common.base.Throwables;
import com.google.common.util.concurrent.*;
import com.lyndir.lhunath.opal.system.logging.Logger;
import com.lyndir.lhunath.opal.system.util.ConversionUtils;
import java.util.concurrent.*;
@@ -55,11 +57,14 @@ public class EmergencyActivity extends Activity {
Spinner typeField;
@InjectView(R.id.counterField)
NumberPicker counterField;
EditText counterField;
@InjectView(R.id.sitePasswordField)
TextView sitePasswordField;
@InjectView(R.id.rememberPasswordField)
CheckBox rememberPasswordField;
private int hc_userName;
private int hc_masterPassword;
@@ -68,6 +73,7 @@ public class EmergencyActivity extends Activity {
super.onCreate( savedInstanceState );
Res.init( getResources() );
getWindow().setFlags( WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE );
setContentView( R.layout.activity_emergency );
ButterKnife.inject( this );
@@ -75,23 +81,26 @@ public class EmergencyActivity extends Activity {
masterPasswordField.setOnFocusChangeListener( updateMasterKey );
siteNameField.addTextChangedListener( updateSitePassword );
typeField.setOnItemSelectedListener( updateSitePassword );
counterField.setOnValueChangedListener( updateSitePassword );
counterField.addTextChangedListener( updateSitePassword );
userNameField.setTypeface( Res.exo_Thin );
userNameField.setPaintFlags( userNameField.getPaintFlags() | Paint.SUBPIXEL_TEXT_FLAG );
masterPasswordField.setTypeface( Res.sourceCodePro_ExtraLight );
masterPasswordField.setPaintFlags( userNameField.getPaintFlags() | Paint.SUBPIXEL_TEXT_FLAG );
masterPasswordField.setPaintFlags( masterPasswordField.getPaintFlags() | Paint.SUBPIXEL_TEXT_FLAG );
siteNameField.setTypeface( Res.exo_Regular );
siteNameField.setPaintFlags( userNameField.getPaintFlags() | Paint.SUBPIXEL_TEXT_FLAG );
siteNameField.setPaintFlags( siteNameField.getPaintFlags() | Paint.SUBPIXEL_TEXT_FLAG );
sitePasswordField.setTypeface( Res.sourceCodePro_Black );
sitePasswordField.setPaintFlags( userNameField.getPaintFlags() | Paint.SUBPIXEL_TEXT_FLAG );
sitePasswordField.setPaintFlags( sitePasswordField.getPaintFlags() | Paint.SUBPIXEL_TEXT_FLAG );
typeField.setAdapter( new ArrayAdapter<>( this, R.layout.type_item, MPSiteType.forClass( MPSiteTypeClass.Generated ) ) );
typeField.setSelection( MPSiteType.GeneratedLong.ordinal() );
counterField.setMinValue( 1 );
counterField.setMaxValue( Integer.MAX_VALUE );
counterField.setWrapSelectorWheel( false );
rememberPasswordField.setOnCheckedChangeListener( new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(final CompoundButton buttonView, final boolean isChecked) {
getPreferences( MODE_PRIVATE ).edit().putBoolean( "rememberPassword", isChecked ).apply();
}
} );
}
@Override
@@ -99,25 +108,32 @@ public class EmergencyActivity extends Activity {
super.onResume();
userNameField.setText( getPreferences( MODE_PRIVATE ).getString( "userName", "" ) );
rememberPasswordField.setSelected( isRememberPasswordEnabled() );
masterPasswordField.requestFocus();
}
@Override
protected void onPause() {
synchronized (this) {
hc_userName = hc_masterPassword = 0;
if (masterKeyFuture != null) {
masterKeyFuture.cancel( true );
masterKeyFuture = null;
if (!isRememberPasswordEnabled()) {
synchronized (this) {
hc_userName = hc_masterPassword = 0;
if (masterKeyFuture != null) {
masterKeyFuture.cancel( true );
masterKeyFuture = null;
}
sitePasswordField.setText( "" );
progressView.setVisibility( View.INVISIBLE );
}
}
sitePasswordField.setText( "" );
progressView.setVisibility( View.INVISIBLE );
super.onPause();
}
private boolean isRememberPasswordEnabled() {
return getPreferences( MODE_PRIVATE ).getBoolean( "rememberPassword", false );
}
private synchronized void updateMasterKey() {
final String userName = userNameField.getText().toString();
final String masterPassword = masterPasswordField.getText().toString();
@@ -126,9 +142,7 @@ public class EmergencyActivity extends Activity {
hc_userName = userName.hashCode();
hc_masterPassword = masterPassword.hashCode();
SharedPreferences.Editor pref = getPreferences( MODE_PRIVATE ).edit();
pref.putString( "userName", userName );
pref.apply();
getPreferences( MODE_PRIVATE ).edit().putString( "userName", userName ).apply();
if (masterKeyFuture != null)
masterKeyFuture.cancel( true );
@@ -170,7 +184,7 @@ public class EmergencyActivity extends Activity {
private void updateSitePassword() {
final String siteName = siteNameField.getText().toString();
final MPSiteType type = (MPSiteType) typeField.getSelectedItem();
final int counter = counterField.getValue();
final int counter = ConversionUtils.toIntegerNN( counterField.getText() );
if (masterKeyFuture == null || siteName.isEmpty() || type == null) {
sitePasswordField.setText( "" );
@@ -220,13 +234,13 @@ public class EmergencyActivity extends Activity {
ClipDescription description = new ClipDescription( strf( "Password for %s", siteNameField.getText() ),
new String[]{ ClipDescription.MIMETYPE_TEXT_PLAIN } );
((ClipboardManager) getSystemService( CLIPBOARD_SERVICE )).setPrimaryClip(
new ClipData( description, new ClipData.Item( sitePassword ) ) );
ClipData clipData = new ClipData( description, new ClipData.Item( sitePassword ) );
((ClipboardManager) getSystemService( CLIPBOARD_SERVICE )).setPrimaryClip( clipData );
Intent startMain = new Intent(Intent.ACTION_MAIN);
startMain.addCategory(Intent.CATEGORY_HOME);
startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(startMain);
Intent startMain = new Intent( Intent.ACTION_MAIN );
startMain.addCategory( Intent.CATEGORY_HOME );
startMain.setFlags( Intent.FLAG_ACTIVITY_NEW_TASK );
startActivity( startMain );
}
private abstract class ValueChangedListener

View File

@@ -171,6 +171,7 @@ public class PasswordFrame extends JFrame implements DocumentListener {
passwordField.setHorizontalAlignment( JTextField.CENTER );
passwordField.setAlignmentX( Component.CENTER_ALIGNMENT );
passwordField.setEditable( false );
passwordField.putClientProperty( "JPasswordField.cutCopyAllowed", true );
passwordEchoChar = passwordField.getEchoChar();
passwordEchoFont = passwordField.getFont().deriveFont( 40f );
updateMask();

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>com.lyndir.lhunath</groupId>
<artifactId>lyndir</artifactId>
<version>1.18</version>
<version>1.20</version>
</parent>
<name>Master Password</name>

View File

@@ -719,7 +719,7 @@
return NO;
BIGNUM *permutations = BN_new(), *templatePermutations = BN_new();
for (int t = 0; t < count; ++t) {
for (size_t t = 0; t < count; ++t) {
const char *template = templates[t];
BN_one( templatePermutations );

View File

@@ -6,15 +6,15 @@
// Copyright (c) 2012 Lyndir. All rights reserved.
//
#define MPErrorDomain @"MPErrorDomain"
NSString *const MPErrorDomain;
#define MPSignedInNotification @"MPSignedInNotification"
#define MPSignedOutNotification @"MPSignedOutNotification"
#define MPKeyForgottenNotification @"MPKeyForgottenNotification"
#define MPSiteUpdatedNotification @"MPSiteUpdatedNotification"
#define MPCheckConfigNotification @"MPCheckConfigNotification"
#define MPSitesImportedNotification @"MPSitesImportedNotification"
#define MPFoundInconsistenciesNotification @"MPFoundInconsistenciesNotification"
NSString *const MPSignedInNotification;
NSString *const MPSignedOutNotification;
NSString *const MPKeyForgottenNotification;
NSString *const MPSiteUpdatedNotification;
NSString *const MPCheckConfigNotification;
NSString *const MPSitesImportedNotification;
NSString *const MPFoundInconsistenciesNotification;
#define MPSitesImportedNotificationUserKey @"MPSitesImportedNotificationUserKey"
#define MPInconsistenciesFixResultUserKey @"MPInconsistenciesFixResultUserKey"
NSString *const MPSitesImportedNotificationUserKey;
NSString *const MPInconsistenciesFixResultUserKey;

View File

@@ -0,0 +1,22 @@
//
// MPTypes.c
// MasterPassword
//
// Created by Maarten Billemont on 02/01/12.
// Copyright (c) 2012 Lyndir. All rights reserved.
//
#import "MPTypes.h"
NSString *const MPErrorDomain = @"MPErrorDomain";
NSString *const MPSignedInNotification = @"MPSignedInNotification";
NSString *const MPSignedOutNotification = @"MPSignedOutNotification";
NSString *const MPKeyForgottenNotification = @"MPKeyForgottenNotification";
NSString *const MPSiteUpdatedNotification = @"MPSiteUpdatedNotification";
NSString *const MPCheckConfigNotification = @"MPCheckConfigNotification";
NSString *const MPSitesImportedNotification = @"MPSitesImportedNotification";
NSString *const MPFoundInconsistenciesNotification = @"MPFoundInconsistenciesNotification";
NSString *const MPSitesImportedNotificationUserKey = @"MPSitesImportedNotificationUserKey";
NSString *const MPInconsistenciesFixResultUserKey = @"MPInconsistenciesFixResultUserKey";

View File

@@ -390,7 +390,7 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
NSAlert *alert = [NSAlert alertWithMessageText:@"Delete User"
defaultButton:@"Delete" alternateButton:nil otherButton:@"Cancel"
informativeTextWithFormat:@"This will delete %@ and all his sites.", self.activeUserForMainThread.name];
informativeTextWithFormat:@"This will delete %@ and all their sites.", self.activeUserForMainThread.name];
if ([alert runModal] != NSAlertDefaultReturn)
return;

View File

@@ -412,7 +412,7 @@
NSArray *types = [site.algorithm allTypesStartingWith:MPSiteTypeGeneratedPIN];
[self.passwordTypesMatrix renewRows:(NSInteger)[types count] columns:1];
for (NSUInteger t = 0; t < [types count]; ++t) {
MPSiteType type = [types[t] unsignedIntegerValue];
MPSiteType type = (MPSiteType)[types[t] unsignedIntegerValue];
NSString *title = [site.algorithm nameOfType:type];
if (type & MPSiteTypeClassGenerated)
title = [site.algorithm generatePasswordForSiteNamed:site.name ofType:type

View File

@@ -18,6 +18,8 @@
#import <Foundation/Foundation.h>
#import "MPSiteEntity.h"
#import "MPAlgorithm.h"
@class MPSiteEntity;
@interface MPSiteModel : NSObject

View File

@@ -57,6 +57,8 @@
DA3B8456190FC89700246EEA /* MPFixable.m in Sources */ = {isa = PBXBuildFile; fileRef = DA3B8454190FC89700246EEA /* MPFixable.m */; };
DA3BCFCD19BD09E0006B2681 /* SourceCodePro-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = DA3BCFCC19BD09E0006B2681 /* SourceCodePro-Regular.otf */; };
DA4DA1D91564471A00F6F596 /* libjrswizzle.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DAC6326C148680650075AEA5 /* libjrswizzle.a */; };
DA4DAE941A7D8117003E5423 /* MPAlgorithmV3.m in Sources */ = {isa = PBXBuildFile; fileRef = DA4DAE921A7D8117003E5423 /* MPAlgorithmV3.m */; };
DA4DAE951A7D8117003E5423 /* MPTypes.m in Sources */ = {isa = PBXBuildFile; fileRef = DA4DAE931A7D8117003E5423 /* MPTypes.m */; };
DA5180CA19FF2F9200A587E9 /* MPAlgorithmV2.m in Sources */ = {isa = PBXBuildFile; fileRef = DA5180C719FF2F9200A587E9 /* MPAlgorithmV2.m */; };
DA5180CE19FF307E00A587E9 /* MPAppDelegate_Store.m in Sources */ = {isa = PBXBuildFile; fileRef = DA5180CD19FF307E00A587E9 /* MPAppDelegate_Store.m */; };
DA5E5C9417248AA1003798D8 /* libscryptenc-osx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DA5E5C8717248AA1003798D8 /* libscryptenc-osx.a */; };
@@ -328,6 +330,9 @@
DA3B8454190FC89700246EEA /* MPFixable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPFixable.m; sourceTree = "<group>"; };
DA3B8455190FC89700246EEA /* MPFixable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPFixable.h; sourceTree = "<group>"; };
DA3BCFCC19BD09E0006B2681 /* SourceCodePro-Regular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SourceCodePro-Regular.otf"; sourceTree = "<group>"; };
DA4DAE911A7D8117003E5423 /* MPAlgorithmV3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAlgorithmV3.h; sourceTree = "<group>"; };
DA4DAE921A7D8117003E5423 /* MPAlgorithmV3.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAlgorithmV3.m; sourceTree = "<group>"; };
DA4DAE931A7D8117003E5423 /* MPTypes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPTypes.m; sourceTree = "<group>"; };
DA5180C619FF2F9200A587E9 /* MPAlgorithmV2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAlgorithmV2.h; sourceTree = "<group>"; };
DA5180C719FF2F9200A587E9 /* MPAlgorithmV2.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAlgorithmV2.m; sourceTree = "<group>"; };
DA5180CC19FF307E00A587E9 /* MPAppDelegate_Store.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAppDelegate_Store.h; sourceTree = "<group>"; };
@@ -787,6 +792,10 @@
DA67743B1A474A03004F356A /* mpw-test */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "mpw-test"; sourceTree = BUILT_PRODUCTS_DIR; };
DA6774481A47C8F7004F356A /* mpw-tests-util.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "mpw-tests-util.c"; sourceTree = "<group>"; };
DA6774491A47C8F7004F356A /* mpw-tests-util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "mpw-tests-util.h"; sourceTree = "<group>"; };
DA831A271A6E1146000AC234 /* mpw-algorithm_v0.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "mpw-algorithm_v0.c"; sourceTree = "<group>"; };
DA831A281A6E1146000AC234 /* mpw-algorithm_v1.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "mpw-algorithm_v1.c"; sourceTree = "<group>"; };
DA831A291A6E1146000AC234 /* mpw-algorithm_v2.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "mpw-algorithm_v2.c"; sourceTree = "<group>"; };
DA831A2A1A6E1146000AC234 /* mpw-algorithm_v3.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "mpw-algorithm_v3.c"; sourceTree = "<group>"; };
DA89D4EA1A51EABD00AC64D7 /* Pearl-Cocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Pearl-Cocoa.h"; sourceTree = "<group>"; };
DA89D4EB1A51EABD00AC64D7 /* Pearl-Cocoa.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Pearl-Cocoa.m"; sourceTree = "<group>"; };
DA8ED891192906920099B726 /* PearlTween.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PearlTween.m; sourceTree = "<group>"; };
@@ -1061,6 +1070,8 @@
DA5E5C9C1724A667003798D8 /* MPAlgorithmV1.m */,
DA5180C619FF2F9200A587E9 /* MPAlgorithmV2.h */,
DA5180C719FF2F9200A587E9 /* MPAlgorithmV2.m */,
DA4DAE911A7D8117003E5423 /* MPAlgorithmV3.h */,
DA4DAE921A7D8117003E5423 /* MPAlgorithmV3.m */,
DA5E5C9D1724A667003798D8 /* MPAppDelegate_Key.h */,
DA5E5C9E1724A667003798D8 /* MPAppDelegate_Key.m */,
DA5E5C9F1724A667003798D8 /* MPAppDelegate_Shared.h */,
@@ -1084,6 +1095,7 @@
DA32CFDA19CF1C70004F3F0E /* MPStoredSiteEntity.h */,
DA32CFDB19CF1C70004F3F0E /* MPStoredSiteEntity.m */,
DA5E5CAF1724A667003798D8 /* MPTypes.h */,
DA4DAE931A7D8117003E5423 /* MPTypes.m */,
DA32CFE319CF1C71004F3F0E /* MPUserEntity.h */,
DA32CFE419CF1C71004F3F0E /* MPUserEntity.m */,
);
@@ -1539,6 +1551,10 @@
DA67732B1A4746AF004F356A /* build */,
DA67732C1A4746AF004F356A /* distribute */,
DA67732D1A4746AF004F356A /* install */,
DA831A271A6E1146000AC234 /* mpw-algorithm_v0.c */,
DA831A281A6E1146000AC234 /* mpw-algorithm_v1.c */,
DA831A291A6E1146000AC234 /* mpw-algorithm_v2.c */,
DA831A2A1A6E1146000AC234 /* mpw-algorithm_v3.c */,
DA6773BB1A4746AF004F356A /* mpw-algorithm.c */,
DA6773BC1A4746AF004F356A /* mpw-algorithm.h */,
DA6773BF1A4746AF004F356A /* mpw-bench.c */,
@@ -2248,6 +2264,8 @@
93D394C4254EEB45FB335AFB /* MPSitesTableView.m in Sources */,
DA6774291A4746AF004F356A /* mpw-algorithm.c in Sources */,
93D395E4830290EBB6E71F34 /* MPNoStateButton.m in Sources */,
DA4DAE941A7D8117003E5423 /* MPAlgorithmV3.m in Sources */,
DA4DAE951A7D8117003E5423 /* MPTypes.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View File

@@ -8,9 +8,7 @@
/* Begin PBXBuildFile section */
93D390228D0B8ED51C0AFDB4 /* bashlib in Resources */ = {isa = PBXBuildFile; fileRef = 93D39E71D6BAECEC4CD886F4 /* bashlib */; };
93D3906F9ED6493C81A59FC5 /* mpw-algorithm_v2.c in Sources */ = {isa = PBXBuildFile; fileRef = 93D390A3B351FEF1B9EDAB56 /* mpw-algorithm_v2.c */; };
93D390C1B93F9D3AE37DD0A5 /* MPAnswersViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D39C426E03358384018E85 /* MPAnswersViewController.m */; };
93D390CE9E30180167317730 /* mpw-algorithm_v1.c in Sources */ = {isa = PBXBuildFile; fileRef = 93D396F918E6470DB846C17F /* mpw-algorithm_v1.c */; };
93D391ECBD9BD2C64115B5DD /* PearlSizedTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D39156E806BB78E04F78B9 /* PearlSizedTextView.m */; };
93D3922A53E41A54832E90D9 /* PearlOverlay.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D390FADEB325D8D54A957D /* PearlOverlay.m */; };
93D39262A8A97DB748213309 /* PearlEMail.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D393BB973253D4BAAC84AA /* PearlEMail.m */; };
@@ -22,7 +20,6 @@
93D39392DEDA376F93C6C718 /* MPCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D39BAA71DE51B4D8A1286C /* MPCell.m */; };
93D3939661CE37180AF7CD6A /* MPStoreViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D3957D76F71A652716EECC /* MPStoreViewController.m */; };
93D393DB5325820241BA90A7 /* PearlSizedTextView.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D39A4759186F6D2D34AA6B /* PearlSizedTextView.h */; };
93D393E4A18BF21ABC229C1E /* mpw-algorithm_v3.c in Sources */ = {isa = PBXBuildFile; fileRef = 93D39D4E713564B7654341B0 /* mpw-algorithm_v3.c */; };
93D394982CBD25D46692DD7C /* MPWebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D3990E0CD1B5CF9FBB2C07 /* MPWebViewController.m */; };
93D394B5036C882B33C71872 /* MPPasswordsSegue.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D39E7A12CC352B2825AA66 /* MPPasswordsSegue.m */; };
93D39536EB550E811CCD04BC /* UIResponder+PearlFirstResponder.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D394482BB07F90E8FD1314 /* UIResponder+PearlFirstResponder.h */; };
@@ -56,7 +53,6 @@
93D39B8F90F58A5D158DDBA3 /* MPPasswordsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D3924EE15017F8A12CB436 /* MPPasswordsViewController.m */; };
93D39BA1EA3CAAC8A220B4A6 /* MPAppSettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D3916C1D8F1427DFBDEBCA /* MPAppSettingsViewController.m */; };
93D39C34FE35830EF5BE1D2A /* NSArray+Indexing.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D396D04E57792A54D437AC /* NSArray+Indexing.h */; };
93D39C7B89BEA08A829C66F4 /* mpw-algorithm_v0.c in Sources */ = {isa = PBXBuildFile; fileRef = 93D390A99850139D0FF0211E /* mpw-algorithm_v0.c */; };
93D39CEA71BD460ED4876920 /* build in Resources */ = {isa = PBXBuildFile; fileRef = 93D39B573E4DE98BAE518215 /* build */; };
93D39D38356F59DBEF934D70 /* MPAppDelegate_InApp.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D394C78C7B879C9AD9152C /* MPAppDelegate_InApp.m */; };
93D39D47FC623E91FC39D20C /* UICollectionView+PearlReloadFromArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D3908DF8EABBD952065DC0 /* UICollectionView+PearlReloadFromArray.m */; };
@@ -65,6 +61,7 @@
93D39DF2E77B937D77C10414 /* install in Resources */ = {isa = PBXBuildFile; fileRef = 93D39ACD33E79386E6F33601 /* install */; };
93D39E281E3658B30550CB55 /* NSDictionary+Indexing.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D39AA1EE2E1E7B81372240 /* NSDictionary+Indexing.m */; };
93D39E34FD28D24FE3442C48 /* UITextView+PearlAttributes.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D3977321EB249981821AB0 /* UITextView+PearlAttributes.m */; };
93D39E5F7F6D7F5C0FAD090F /* MPTypes.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D39D72239990DDAC2D75B0 /* MPTypes.m */; };
93D39EAA4D064193074D3021 /* MPFixable.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D39A813CA9D7E192261ED2 /* MPFixable.m */; };
93D39F8A9254177891F38705 /* MPSetupViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D39A28369954D147E239BA /* MPSetupViewController.m */; };
93D39FAE1BB6A393BFE15FD0 /* mpw.bashrc in Resources */ = {isa = PBXBuildFile; fileRef = 93D39245A478883C672818F3 /* mpw.bashrc */; };
@@ -550,6 +547,7 @@
93D39CF8ADF4542CDC4CD385 /* MPCombinedViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPCombinedViewController.h; sourceTree = "<group>"; };
93D39D4E713564B7654341B0 /* mpw-algorithm_v3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "mpw-algorithm_v3.c"; sourceTree = "<group>"; };
93D39D6604447D7708039155 /* MPAnswersViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAnswersViewController.h; sourceTree = "<group>"; };
93D39D72239990DDAC2D75B0 /* MPTypes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPTypes.m; sourceTree = "<group>"; };
93D39D8A953779B35403AF6E /* PearlUICollectionView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PearlUICollectionView.m; sourceTree = "<group>"; };
93D39DA27D768B53C8B1330C /* MPAvatarCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAvatarCell.h; sourceTree = "<group>"; };
93D39DE2CB351D4E3789462B /* UIScrollView+PearlAdjustInsets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIScrollView+PearlAdjustInsets.h"; sourceTree = "<group>"; };
@@ -1622,6 +1620,10 @@
93D39B573E4DE98BAE518215 /* build */,
93D3979016BF0C5B29D1340D /* distribute */,
93D39ACD33E79386E6F33601 /* install */,
93D390A99850139D0FF0211E /* mpw-algorithm_v0.c */,
93D396F918E6470DB846C17F /* mpw-algorithm_v1.c */,
93D390A3B351FEF1B9EDAB56 /* mpw-algorithm_v2.c */,
93D39D4E713564B7654341B0 /* mpw-algorithm_v3.c */,
93D3969393A3A46BD27D7078 /* mpw-algorithm.c */,
93D3990D850D76A94C6B7A4D /* mpw-algorithm.h */,
93D39B70138D0E28F7D5E86B /* mpw-bench.c */,
@@ -1634,10 +1636,6 @@
93D396C311C3725870343EE0 /* mpw-util.c */,
93D39CF7DB942C69D1C5D6BE /* mpw-util.h */,
93D39245A478883C672818F3 /* mpw.bashrc */,
93D396F918E6470DB846C17F /* mpw-algorithm_v1.c */,
93D390A99850139D0FF0211E /* mpw-algorithm_v0.c */,
93D390A3B351FEF1B9EDAB56 /* mpw-algorithm_v2.c */,
93D39D4E713564B7654341B0 /* mpw-algorithm_v3.c */,
);
name = C;
path = ../../C;
@@ -2560,23 +2558,20 @@
DABD3B9F1711E2DB00CF925C /* ObjC */ = {
isa = PBXGroup;
children = (
DA32D05319D741DC004F3F0E /* MPSiteQuestionEntity.h */,
DA32D05419D741DC004F3F0E /* MPSiteQuestionEntity.m */,
DA32CFE619CF1C8F004F3F0E /* MPUserEntity.m */,
DA32CFE719CF1C8F004F3F0E /* MPUserEntity.h */,
DA32CFE819CF1C8F004F3F0E /* MPStoredSiteEntity.m */,
DA32CFE919CF1C8F004F3F0E /* MPStoredSiteEntity.h */,
DA32CFEC19CF1C8F004F3F0E /* MPSiteEntity.m */,
DA32CFED19CF1C8F004F3F0E /* MPSiteEntity.h */,
DA32CFEE19CF1C8F004F3F0E /* MPGeneratedSiteEntity.m */,
DA32CFEF19CF1C8F004F3F0E /* MPGeneratedSiteEntity.h */,
DABD3BD71711E2DC00CF925C /* iOS */,
DA32D00119CF4735004F3F0E /* MasterPassword.xcdatamodeld */,
DABD3BA01711E2DC00CF925C /* MPAlgorithm.h */,
DABD3BA11711E2DC00CF925C /* MPAlgorithm.m */,
DABD3BA21711E2DC00CF925C /* MPAlgorithmV0.h */,
DABD3BA31711E2DC00CF925C /* MPAlgorithmV0.m */,
DABD3BA41711E2DC00CF925C /* MPAlgorithmV1.h */,
DABD3BA51711E2DC00CF925C /* MPAlgorithmV1.m */,
93D39A97A7D48CB3B784194D /* MPAlgorithmV2.h */,
93D399A8E3181B442D347CD7 /* MPAlgorithmV2.m */,
93D394D73F5BC92297CE8D7B /* MPAlgorithmV3.h */,
93D39FD9623E8D5571C0AEB3 /* MPAlgorithmV3.m */,
93D39CECA10BCCB0BA581BF1 /* MPAppDelegate_InApp.h */,
93D394C78C7B879C9AD9152C /* MPAppDelegate_InApp.m */,
DABD3BA61711E2DC00CF925C /* MPAppDelegate_Key.h */,
DABD3BA71711E2DC00CF925C /* MPAppDelegate_Key.m */,
DABD3BA81711E2DC00CF925C /* MPAppDelegate_Shared.h */,
@@ -2587,18 +2582,22 @@
DABD3BAD1711E2DC00CF925C /* MPConfig.m */,
DABD3BB41711E2DC00CF925C /* MPEntities.h */,
DABD3BB51711E2DC00CF925C /* MPEntities.m */,
DABD3BB61711E2DC00CF925C /* MPKey.h */,
DABD3BB71711E2DC00CF925C /* MPKey.m */,
DABD3BB81711E2DC00CF925C /* MPTypes.h */,
DA32D00119CF4735004F3F0E /* MasterPassword.xcdatamodeld */,
93D399F244BB522A317811BB /* MPFixable.h */,
93D39A813CA9D7E192261ED2 /* MPFixable.m */,
93D394C78C7B879C9AD9152C /* MPAppDelegate_InApp.m */,
93D39CECA10BCCB0BA581BF1 /* MPAppDelegate_InApp.h */,
93D399A8E3181B442D347CD7 /* MPAlgorithmV2.m */,
93D39A97A7D48CB3B784194D /* MPAlgorithmV2.h */,
93D394D73F5BC92297CE8D7B /* MPAlgorithmV3.h */,
93D39FD9623E8D5571C0AEB3 /* MPAlgorithmV3.m */,
DA32CFEF19CF1C8F004F3F0E /* MPGeneratedSiteEntity.h */,
DA32CFEE19CF1C8F004F3F0E /* MPGeneratedSiteEntity.m */,
DABD3BB61711E2DC00CF925C /* MPKey.h */,
DABD3BB71711E2DC00CF925C /* MPKey.m */,
DA32CFED19CF1C8F004F3F0E /* MPSiteEntity.h */,
DA32CFEC19CF1C8F004F3F0E /* MPSiteEntity.m */,
DA32D05319D741DC004F3F0E /* MPSiteQuestionEntity.h */,
DA32D05419D741DC004F3F0E /* MPSiteQuestionEntity.m */,
DA32CFE919CF1C8F004F3F0E /* MPStoredSiteEntity.h */,
DA32CFE819CF1C8F004F3F0E /* MPStoredSiteEntity.m */,
DABD3BB81711E2DC00CF925C /* MPTypes.h */,
DA32CFE719CF1C8F004F3F0E /* MPUserEntity.h */,
DA32CFE619CF1C8F004F3F0E /* MPUserEntity.m */,
93D39D72239990DDAC2D75B0 /* MPTypes.m */,
);
name = ObjC;
path = ..;
@@ -3655,11 +3654,8 @@
93D392FD5E2052F7D7DB3774 /* NSString+MPMarkDown.m in Sources */,
93D395B715D15F2B56F2A2EE /* mpw-types.c in Sources */,
93D39943D01E70DAC3B0DF76 /* mpw-util.c in Sources */,
93D390CE9E30180167317730 /* mpw-algorithm_v1.c in Sources */,
93D39C7B89BEA08A829C66F4 /* mpw-algorithm_v0.c in Sources */,
93D3906F9ED6493C81A59FC5 /* mpw-algorithm_v2.c in Sources */,
93D393E4A18BF21ABC229C1E /* mpw-algorithm_v3.c in Sources */,
93D39577FD8BB0945DB2F0A3 /* MPAlgorithmV3.m in Sources */,
93D39E5F7F6D7F5C0FAD090F /* MPTypes.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View File

@@ -0,0 +1,31 @@
class Mpw < Formula
homepage "http://masterpasswordapp.com"
url "https://ssl.masterpasswordapp.com/mpw-2.1-cli4-0-gf6b2287.tar.gz"
sha1 "036b3d8f4bd6f0676ae16e7e9c3de65f6030874f"
version "2.1-cli4"
depends_on "automake" => :build
depends_on "autoconf" => :build
depends_on "openssl"
resource "libscrypt" do
url "http://masterpasswordapp.com/libscrypt-b12b554.tar.gz"
sha1 "ee871e0f93a786c4e3622561f34565337cfdb815"
end
def install
resource("libscrypt").stage buildpath/"lib/scrypt"
touch "lib/scrypt/.unpacked"
ENV["targets"] = "mpw mpw-tests"
system "./build"
system "./mpw-tests"
bin.install "mpw"
end
test do
assert_equal "Jejr5[RepuSosp",
shell_output("mpw -u 'Robert Lee Mitchell' -P 'banana colored duckling' masterpasswordapp.com").strip
end
end

View File

@@ -255,7 +255,7 @@
</pre></code>
<p>
The result is a 64-byte <code>key</code> derived from the user's master password. This key will be fed into the rest of the algorithm to produce output passwords that are as private to the user as his master password is.
The result is a 64-byte <code>key</code> derived from the user's master password. This key will be fed into the rest of the algorithm to produce output passwords that are as private to the user as their master password is.
</p>
<h2>Combining The Inputs</h2>

View File

@@ -82,8 +82,7 @@
<a title="iPhone, iPad, iPod touch" href="https://itunes.apple.com/app/id510296984" onclick="_gaq.push(['_trackPageview', '/outbound/ios']);">iPhone / iPad<img class="popup" src="img/ios.png" /></a> |
<a title="Mac (graphical interface)" href="https://itunes.apple.com/app/id662763204" onclick="_gaq.push(['_trackPageview', '/outbound/gui/mac']);">Mac<img class="popup border" src="img/mac-gui.png" /></a> |
<a title="Mac, Linux, UNIX, Windows (graphical interface)" href="https://ssl.masterpasswordapp.com/masterpassword-gui.jar" onclick="_gaq.push(['_trackPageview', '/outbound/gui/java']);">Desktop (Java)<img class="popup" src="img/java-gui.png" /></a> |
Terminal (<a title="Mac, Linux, UNIX, Windows (command line interface)" href="https://ssl.masterpasswordapp.com/masterpassword-cli.zip" onclick="_gaq.push(['_trackPageview', '/outbound/cli/java']);">Java<img class="popup" src="img/java-cli.png" /></a> /
<a title="Mac, Linux, UNIX, Windows (command line interface)" href="https://github.com/Lyndir/MasterPassword/tree/master/MasterPassword/C" onclick="_gaq.push(['_trackPageview', '/outbound/cli/c']);">Native C<img class="popup" src="img/c-cli.png" /></a>) |
Terminal (<a title="Mac, Linux, POSIX (command line interface)" href="https://ssl.masterpasswordapp.com/masterpassword-cli.tar.gz" onclick="_gaq.push(['_trackPageview', '/outbound/cli/c']);">Native C<img class="popup" src="img/c-cli.png" /></a>) |
<a title="Android" href="https://ssl.masterpasswordapp.com/masterpassword-android.apk" onclick="_gaq.push(['_trackPageview', '/outbound/android']);">Android (Beta)<img class="popup" src="img/android.png" /></a> |
<a title="JavaScript" href="https://js.masterpasswordapp.com/" onclick="_gaq.push(['_trackPageview', '/outbound/js']);">Web (Beta)<img class="popup border" src="img/web.png" /></a>
</h4>

View File

@@ -0,0 +1 @@
mpw-2.1-cli4-0-gf6b2287.tar.gz

Binary file not shown.

Binary file not shown.

View File

@@ -1 +1 @@
9d19eaf667de05c7744e8ae1720e1313a3f98774
3932857c2117b8a399fdcb4fa888e9dc1a6818ee

View File

@@ -0,0 +1 @@
../../MasterPassword/C/mpw-2.1-cli3-0-g438daf2.tar.gz

View File

@@ -0,0 +1 @@
../../MasterPassword/C/mpw-2.1-cli4-0-gf6b2287.tar.gz

View File

@@ -296,14 +296,14 @@
<h3 id="masterkey" class="inline">The Master Key</h3>
<p>The first part of the process it to obtain a very strong "token" of your personal identity. We call this token your <em>master key</em>, because it is very much like the one and only <strong>main key that opens all your doors</strong>. It is a personal key, it represents your identity.</p>
<p>The master key is derived from your name and your master password, and thrown away as soon as it's no longer needed to minimize the risk of loss.</p>
<p>Since it's vital that nobody else can gain access to your master key, it's important that the process of deriving the key is insurmountably difficult. An attacker could try a brute-force attack against your master key or password by convincing you to make an account on his website, and then guessing at your master password or your master key until he finds one that gives him your password for his fake site.</p>
<p>Since it's vital that nobody else can gain access to your master key, it's important that the process of deriving the key is insurmountably difficult. An attacker could try a brute-force attack against your master key or password by convincing you to make an account on their website, and then guessing at your master password or your master key until he finds one that gives him your password for their fake site.</p>
<p>These are two different types of brute-force attacks and we need to make sure to defeat both of them.</p>
<p>To defeat a brute-force attack against your master key, we make sure the master key is sufficiently high in entropy. Since the master key is a 256-bit key, an attacker would now have to make up to <code>2<sup>256</sup></code> guesses, or try <code>115792089237316195423570985008687907853269984665640564039457584007913129639936</code> master keys before finding the right one. Even at an ambitious rate of 2 billion tries per second, it would take several times the age of the universe to try all of them.
<p>A brute-force attack against your master password is more feasible, since your master password will be tiny compared to such a huge master key.</p>
<p>Even if you used an 8-character evenly distributed random alphanumeric password (such as <code>yIp6X2qd</code>), a smart attacker could brute-force such a password in less than <em>1.7 days</em>.</p>
<p>To solve this problem, we introduce an expensive <q>scrypt</q>-based <em>key derivation</em> step. <em>scrypt</em> specifically improves on standard key derivation techniques by not only wasting a lot of <em>CPU time</em>, but also consuming huge amounts of <em>RAM</em>. We need to be careful to choose the right parameters so that logging into Master Password doesn't take too long on weaker mobile devices while the possibility of guessing at passwords is sufficiently
crippled for attackers. The theory is, the longer it takes for an attacker to try out one guess of your master password, the longer it'll take him to find the right one. We pull this theory into the extreme so that guessing your password now takes <strong>2151076 years</strong> instead of <em>1.7 days</em> while logging into Master Password on an iPhone 4S takes no more than 3 seconds.</p>
<p>It bears note that <em>scrypt</em>'s approach is specifically interesting because it costs both a lot of CPU and a lot of RAM to derive a master key. That means that the more computers an attacker buys, the more his $ cost goes up. CPU and RAM are expensive, and forcing the derivation to use a lot instead of minuscule amounts causes the $ cost of a brute-force attack to become phenomenal.</p>
<p>It bears note that <em>scrypt</em>'s approach is specifically interesting because it costs both a lot of CPU and a lot of RAM to derive a master key. That means that the more computers an attacker buys, the more their $ cost goes up. CPU and RAM are expensive, and forcing the derivation to use a lot instead of minuscule amounts causes the $ cost of a brute-force attack to become phenomenal.</p>
<p>Given these solutions, we feel confident Master Password is adequately protected against attacks on your private master key.</p>
</div>
<div class="hlvl">

View File

@@ -3,4 +3,4 @@ set -e
cd "${BASH_SOURCE[0]%/*}"
s3cmd sync --exclude '.git/**' --delete-removed --follow-symlinks --preserve --acl-public --reduced-redundancy . s3://masterpasswordapp.com/
rsync -avP --no-group . satura.lyndir.com:/usr/local/www/masterpasswordapp.com/htdocs-secure/
rsync -avPL --no-group . satura.lyndir.com:/usr/local/www/masterpasswordapp.com/htdocs-secure/

View File

@@ -160,7 +160,7 @@
<a name="trust"></a>
<h2>You speak of trust, how can I trust you?</h2>
<p>A very valid question, and arguably the most important one to ask!</p>
<p>Trust is a very difficult thing to guarantee. Powerful entities will solicit your trust by appearing with it and coming well recommended. Trust can also be assured by legalese or contracts. If you have the means and energy to hold an entity responsible for his claims and actions, this might be sufficient for you.</p>
<p>Trust is a very difficult thing to guarantee. Powerful entities will solicit your trust by appearing with it and coming well recommended. Trust can also be assured by legalese or contracts. If you have the means and energy to hold an entity responsible for their claims and actions, this might be sufficient for you.</p>
<p>Most of us mere mortals cannot afford this level of trust enforcement, however. We're mostly left in the position of trusting claims blindly, in the hopes that companies will not violate those claims for fear of taking a seizable public-relations hit.</p>
<h3>I propose that none of these forms of trust are sufficient adequate.</h3>
<p>In fact, Master Password is what it is because it aims to avoid any requirement of trust in the solution's author. Master Password requires no services or proprietary storage format. I've published Master Password's algorithm for you to inspect and licensed to you the full source code to the implementations for you to use.</p>

View File

@@ -12,7 +12,7 @@
<body>
<header>
<p><strong>BETA</strong> - This site may not yet work on your browser.<br>
Passwords are generated locally, your master password is not sent to any server. See <a href="https://github.com/Lyndir/MasterPassword/tree/master/Site/2013-05/mpw-js">the source</a>.</p>
Passwords are generated locally, your master password is not sent to any server. See <a href="https://github.com/Lyndir/MasterPassword/tree/master/Site/mpw-js">the source</a>.</p>
<span id="error"></span>
</header>
<section id="identity" class="active"><form action="#">
@@ -51,15 +51,15 @@
<footer>
<p>This page was made possible thanks to <a href="https://tomthorogood.co.uk/" title="Tom Thorogood">tmthrgd</a>'s <a href="https://github.com/tmthrgd/mpw-js">mpw-js</a>.<br>
<em><a href="http://masterpasswordapp.com">Master Password</a> is a security product and algorithm by <a href="http://www.lhunath.com" title="Maarten Billemont">Maarten Billemont</a>, <a href="http://www.lyndir.com">Lyndir</a> (&copy; 2011-2014).</em><br>
Usage implies agreement with our <a href="/privacy.html">privacy policy and disclaimer</a>.</p>
Usage implies agreement with our <a href="http://masterpasswordapp.com/privacy.html">privacy policy and disclaimer</a>.</p>
</footer>
<!-- Scripts -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-2.1.1.js"><\/script>')</script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-2.1.1.min.js"><\/script>')</script>
<script src="js/dependencies.js?2"></script>
<script src="js/main.js?2"></script>
<script src="js/dependencies.js?3"></script>
<script src="js/main.js?3"></script>
</body>
</html>

View File

@@ -41,7 +41,7 @@ window.setImmediate || document.write("<script src=js/mpw-js/" + esdir + "setImm
// Include the scrypt implementation
var SCRYPTASM_PATH = (window.location + '').replace(/[^/]*(#[^#]*)?$/, 'js/mpw-js/scrypt-asm.js');
document.write("<script src=js/mpw-js/" + esdir + "scrypt.js><\/script>");
document.write("<script src=js/mpw-js/" + esdir + "scrypt.js?1><\/script>");
// Include the MPW class
document.write("<script src=js/mpw-js/" + esdir + "mpw.js><\/script>");
document.write("<script src=js/mpw-js/" + esdir + "mpw.js?1><\/script>");